結果

問題 No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか?
ユーザー chocoruskchocorusk
提出日時 2021-01-23 00:46:14
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 378 ms / 2,000 ms
コード長 1,083 bytes
コンパイル時間 1,268 ms
コンパイル使用メモリ 126,600 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-28 12:13:02
合計ジャッジ時間 2,472 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <stack>
#include <array>
#include <list>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
    int t; cin>>t;
    while(t--){
        ll s=0;
        ll a[1010], p[1010];
        int k; ll x, y; cin>>k>>x>>y;
        for(int i=0; i<k; i++){
            cin>>a[i];
        }
        for(int i=0; i<k; i++){
            cin>>p[i];
            s^=(a[i]%(p[i]+1));
        }
        //cout<<s<<" "<<x<<" "<<y<<endl;
        if(s==0){
            if(x<=y) cout<<"C"<<endl;
            else cout<<"Z"<<endl;
        }else{
            if(x+s<=y) cout<<"C"<<endl;
            else cout<<"Z"<<endl;
        }
    }
    return 0;
}
0