当前位置:网站首页>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;
}
边栏推荐
- JS determines whether the mobile terminal or the PC terminal
- Redis key value database [advanced]
- 如何使用MITMPROXy
- Compte à rebours de 3 jours pour l'inscription à l'accélérateur de démarrage Google Sea, Guide de démarrage collecté à l'avance!
- Mock simulate the background return data with mockjs
- cookie插件和localForage离线储存插件
- 使用HBuilderX的一些常用功能
- Step by step | help you easily submit Google play data security form
- [C language] simple implementation of mine sweeping game
- 谷歌出海创业加速器报名倒计时 3 天,创业人闯关指南提前收藏!
猜你喜欢
Memcached installation
Shenji Bailian 3.52-prim
Unity shader learning notes (3) URP rendering pipeline shaded PBR shader template (ASE optimized version)
keepalived安装使用与快速入门
Can't the dist packaged by vite be opened directly in the browser
神机百炼3.54-染色法判定二分图
如何使用MITMPROXy
How to use mitmproxy
社区说|Kotlin Flow 的原理与设计哲学
数据回放伴侣Rviz+plotjuggler
随机推荐
Some descriptions of Mipi protocol of LCD
c语言中的几个关键字
PHP read file (read the specified line containing a string in the file)
Redis Key-Value数据库 【秒杀】
图片裁剪插件cropper.js
深度学习分类网络 -- AlexNet
Frequently asked questions about jetpack compose and material you
Lambda 表达式 和 方法引用
如何使用MITMPROXy
Keepalived installation, use and quick start
如何使用MITMPROXy
DRM display framework as I understand it
Stc8h8k series assembly and C51 actual combat - digital display ADC, key serial port reply key number and ADC value
Mathematical statistics and machine learning
Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
The official zero foundation introduction jetpack compose Chinese course is coming!
穀歌出海創業加速器報名倒計時 3 天,創業人闖關指南提前收藏!
Scheme and implementation of automatic renewal of token expiration
Redis key value database [primary]
Ti millimeter wave radar learning (I)