結果
| 問題 |
No.1317 月曜日の朝、WAを出した
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-22 18:49:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 1,500 ms |
| コード長 | 983 bytes |
| コンパイル時間 | 1,010 ms |
| コンパイル使用メモリ | 99,520 KB |
| 最終ジャッジ日時 | 2025-01-18 03:28:25 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
main.cpp: In function ‘void solve()’:
main.cpp:21:29: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
21 | for (auto &&i : a) scanf("%d", &i);
| ~~~~~^~~~~~~~~~
main.cpp:22:29: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
22 | for (auto &&i : b) scanf("%d", &i);
| ~~~~~^~~~~~~~~~
ソースコード
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;
void solve(){
vector<int> a(6), b(6);
for (auto &&i : a) scanf("%d", &i);
for (auto &&i : b) scanf("%d", &i);
string s;
cin >> s;
int cur = 1;
if(s == "TLE") cur = 2;
if(s == "MLE") cur = 3;
if(s == "OLE") cur = 4;
if(s == "RE") cur = 5;
for (int i = 1; i <= 5; ++i) {
if(cur != i && b[i] != 0){
puts("No");
return;
}
if(cur == i && a[i] != 0){
puts("No");
return;
}
}
puts("Yes");
}
int main() {
int t;
cin >> t;
while(t--){
solve();
}
return 0;
}