結果
問題 | No.142 単なる配列の操作に関する実装問題 |
ユーザー | ciel |
提出日時 | 2015-05-27 14:43:41 |
言語 | C++11 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 448 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 48,608 KB |
実行使用メモリ | 8,084 KB |
最終ジャッジ日時 | 2023-09-20 15:54:14 |
合計ジャッジ時間 | 13,287 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
ソースコード
#include <bitset> #include <cstdio> using namespace std; const int M=2000000; int main(){ bitset<M>A,B; int N,S,T,U,V,Q; scanf("%d%d%d%d%d%d",&N,&S,&T,&U,&V,&Q); A[0]=S%2; for(int i=1;i<N;i++)S=((long long)T*S+U)%V,A[i]=S%2; for(;Q--;){ scanf("%d%d%d%d",&S,&T,&U,&V);S--,T--,U--,V--; //B.reset();for(int i=S;i<=T;i++)B[i-S]=A[i]; B=A<<(M-T-1); B>>=S+M-T-1; A^=B<<U; } for(int i=0;i<N;i++)putchar(A[i]%2?'O':'E'); putchar('\n'); }