結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
goodbaton
|
| 提出日時 | 2014-11-21 00:28:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 911 bytes |
| コンパイル時間 | 770 ms |
| コンパイル使用メモリ | 69,868 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 19:43:45 |
| 合計ジャッジ時間 | 1,420 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
23 | scanf("%d",&al[i]);
| ~~~~~^~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
long long c2(long long a){
return a*(a-1)/2;
}
int main(){
int al[27],ch[6]={3,4,7,14,17,22};
long long k=1,sum=0,k1,k1_m=0;
for(int i=0;i<26;i++){
scanf("%d",&al[i]);
sum+=al[i];
}
if(al[4] && al[3] && al[7] && al[11]>=3 && al[14]>=2 && al[17] && al[22]){
al[14]--;
for(int i=0;i<6;i++){
k*=al[ch[i]];
}
for(int j=2;j<=al[11];j++){
k1=c2(j)*(al[11]-j);
if(k1>k1_m) k1_m=k1;
}
k*=k1_m;
}else{
puts("0");
return 0;
}
printf("%lld\n",k);
return 0;
}
goodbaton