結果
問題 | No.1363 [Zelkova Last Tune] 誰がその最後のベルを鳴らすのか? |
ユーザー |
|
提出日時 | 2021-01-30 15:07:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 404 ms / 2,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 506 ms |
コンパイル使用メモリ | 65,660 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 02:42:50 |
合計ジャッジ時間 | 2,505 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; int T,K; long X,Y; long A[1010],P[1010]; main() { cin>>T; for(;T--;) { cin>>K>>X>>Y; for(int i=0;i<K;i++)cin>>A[i]; for(int i=0;i<K;i++)cin>>P[i]; long now=0; for(int i=0;i<K;i++)now^=A[i]%(P[i]+1); if(Y<now)cout<<"Z"<<endl; else { Y-=now; cout<<(X>Y?"Z":"C")<<endl; } } }