結果
| 問題 |
No.1317 月曜日の朝、WAを出した
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-14 02:05:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 1,500 ms |
| コード長 | 398 bytes |
| コンパイル時間 | 474 ms |
| コンパイル使用メモリ | 65,560 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-20 00:22:10 |
| 合計ジャッジ時間 | 950 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main()
| ^~~~
main.cpp: In function 'int main()':
main.cpp:20:38: warning: 'id' may be used uninitialized [-Wmaybe-uninitialized]
20 | cout<<(A[id]==0&&B[id]==sum?"Yes":"No")<<endl;
| ~~~~^
main.cpp:13:21: note: 'id' was declared here
13 | int id;
| ^~
ソースコード
#include<iostream>
using namespace std;
int N;
int A[6],B[6];
main()
{
cin>>N;
for(;N--;)
{
for(int i=0;i<6;i++)cin>>A[i];
for(int i=0;i<6;i++)cin>>B[i];
string x;cin>>x;
int id;
if(x=="WA")id=1;
else if(x=="TLE")id=2;
else if(x=="MLE")id=3;
else if(x=="OLE")id=4;
else if(x=="RE")id=5;
int sum=B[1]+B[2]+B[3]+B[4]+B[5];
cout<<(A[id]==0&&B[id]==sum?"Yes":"No")<<endl;
}
}