当前位置:网站首页>Contest3147 - game 38 of 2021 Freshmen's personal training match_ F: Polyhedral dice
Contest3147 - game 38 of 2021 Freshmen's personal training match_ F: Polyhedral dice
2022-07-02 06:06:00 【This question AC sleep again】
//
#include<bits/stdc++.h>
using namespace std;
// 100*100*100=1e6 < int
const int MAXN=1e6+7;
int a[MAXN];
int main()
{
int n1,n2,n3,i,j,k,temp,max_num,flag;
while( ~scanf("%d%d%d",&n1,&n2,&n3) )
{
flag=max_num=0;
memset( a,0,sizeof( a ) );
for( i=1;i<=n1;i++ )
{
for( j=1;j<=n2;j++ )
{
for( k=1;k<=n3;k++ )
{
a[ i+j+k ]++;
}
}
}
for( i=3;i<=MAXN;i++ ) max_num=max( max_num,a[i] );
for( i=3;i<=MAXN;i++ )
{
if( a[i]==max_num )
{
if( flag ) printf(" %d",i);
else { flag=1; printf("%d",i); }
}
}
printf("\n");
}
return 0;
}
边栏推荐
- Memcached installation
- Flutter 混合开发: 开发一个简单的快速启动框架 | 开发者说·DTalk
- Mock simulate the background return data with mockjs
- Google play academy team PK competition, official start!
- Redis Key-Value数据库【初级】
- PHP parent
- STC8H8K系列汇编和C51实战——按键允许按键计数(利用下降沿中断控制)
- Some experience of exercise and fitness
- JWT tool class
- Fundamentals of software testing
猜你喜欢
MySQL transaction and isolation level
AttributeError: ‘str‘ object has no attribute ‘decode‘
神机百炼3.53-Kruskal
Can't the dist packaged by vite be opened directly in the browser
DRM display framework as I understand it
来自读者们的 I/O 观后感|有奖征集获奖名单
TI毫米波雷达学习(一)
在uni-app中引入uView
From design delivery to development, easy and efficient!
51 single chip microcomputer - ADC explanation (a/d conversion, d/a conversion)
随机推荐
php数组转化为xml
[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP
Google Go to sea entrepreneurship accelerator registration countdown 3 days, entrepreneurs pass through the guide in advance collection!
脑与认知神经科学Matlab Psytoolbox认知科学实验设计——实验设计四
从设计交付到开发,轻松畅快高效率!
Google play academy team PK competition, official start!
Deep learning classification network -- vggnet
PHP inner class name is the same as the inner class method name
Summary of MySQL constraints
Reading notes of cgnf: conditional graph neural fields
How to use mitmproxy
Software testing - concept
1035 Password
PHP read file (read the specified line containing a string in the file)
Redis Key-Value数据库【初级】
网络相关知识(硬件工程师)
STC8H8K系列汇编和C51实战——按键允许按键计数(利用下降沿中断控制)
Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
神机百炼3.53-Kruskal
Cookie plugin and localforce offline storage plugin