結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー CleyLCleyL
提出日時 2024-02-14 23:32:38
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 41 ms / 1,500 ms
コード長 2,161 bytes
コンパイル時間 1,506 ms
コンパイル使用メモリ 133,392 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-02-14 23:32:40
合計ジャッジ時間 2,397 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,548 KB
testcase_01 AC 41 ms
6,548 KB
testcase_02 AC 40 ms
6,548 KB
testcase_03 AC 41 ms
6,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#line 2 "/home/sakflat/CP/_library/cpp/template/template.cpp"

//yukicoder@cpp17

#include <iostream>

#include <cmath>
#include <algorithm>

#include <iomanip>

#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>

#include <bitset>

#include <complex>

#include <cctype>
#include <utility>
#include <climits>

#include <numeric>

#include <functional>

using namespace std;
using ll = long long;
using P = pair<ll,ll>;

const ll MOD = 998244353;
const ll MODx = 1000000007;
const int INF = (1<<30)-1;
const ll LINF = (1LL<<62LL)-1;
const double EPS = (1e-10);

P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};




template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }
 
 /*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる

計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/

/*
function corner below
*/


/*
Function corner above
*/

/* comment outed because can cause bugs
__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}
*/
#line 2 "/home/sakflat/CP/_library/cpp/template/basic.cpp"

map<string,int> Z;

void init(){
  Z["AC"] = 0;
  Z["WA"] = 1;
  Z["TLE"] = 2;
  Z["MLE"] = 3;
  Z["OLE"] = 4;
  Z["RE"] = 5;
}

void solve(){
  vector<int> A(2, 0);
  vector<int> Ad(6, 0);
  for(int i = 0; 6 > i; i++){
    int x;cin>>x;
    if(i)A[1] += x;
    else A[0] += x;
    Ad[i] = x;
  }
  vector<int> B(6);
  for(int i = 0; 6 > i; i++){
    cin>>B[i];
  }
  string s;cin>>s;
  if(Ad[Z[s]] == 0 && B[Z[s]] >= A[1] && A[0]+A[1] == B[Z[s]] + B[0]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

int main(){
  init();
  int n;cin>>n;
  for(int i = 0; n > i; i++)solve();
  return 0;
}
0