当前位置:网站首页>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;
}边栏推荐
- Redis key value database [primary]
- Deep learning classification network -- Network in network
- Software testing - concept
- Sumo tutorial Hello World
- 使用HBuilderX的一些常用功能
- PHP obtains some values in the string according to the specified characters, and reorganizes the remaining strings into a new array
- STC8H8K系列汇编和C51实战——按键允许按键计数(利用下降沿中断控制)
- Memcached installation
- Detailed notes of ES6
- servlet的web.xml配置详解(3.0)
猜你喜欢

DRM display framework as I understand it
![[paper translation] gcnet: non local networks meet squeeze exception networks and beyond](/img/7a/718162d08796f70251511101b3a61b.png)
[paper translation] gcnet: non local networks meet squeeze exception networks and beyond

Shenji Bailian 3.52-prim

官方零基础入门 Jetpack Compose 的中文课程来啦!
![Redis key value database [primary]](/img/47/10461d12720a9dd801f80ed1d3ad23.jpg)
Redis key value database [primary]

51单片机——ADC讲解(A/D转换、D/A转换)

让每一位开发者皆可使用机器学习技术

Memcached installation

【C语言】简单实现扫雷游戏

Test case
随机推荐
Shenji Bailian 3.52-prim
让每一位开发者皆可使用机器学习技术
PHP parent
Zabbix Server trapper 命令注入漏洞 (CVE-2017-2824)
Stick to the big screen UI, finereport development diary
TI毫米波雷达学习(一)
线性dp(拆分篇)
我所理解的DRM显示框架
MUI底部导航的样式修改
官方零基础入门 Jetpack Compose 的中文课程来啦!
servlet的web.xml配置详解(3.0)
On Web server
页面打印插件print.js
复杂 json数据 js前台解析 详细步骤《案例:一》
使用HBuilderX的一些常用功能
php父类(parent)
PHP 开发与测试 Webservice(SOAP)-Win
Addchild() and addattribute() functions in PHP
借力 Google Cloud 基础设施和着陆区,构建企业级云原生卓越运营能力
Redis key value database [primary]