結果
問題 | No.9005 実行時間/使用メモリテスト(テスト用) |
ユーザー | 👑 testestest |
提出日時 | 2015-12-13 18:49:09 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 524 bytes |
コンパイル時間 | 140 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-15 11:47:08 |
合計ジャッジ時間 | 1,356 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:5: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:7: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:9: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:11: warning: type defaults to ‘int’ in declaration of ‘z’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:2:15: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 2 | n,p,s,x,y,z,i,j; | ^ main.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 5 | main(){ | ^~~~ main.c: In function ‘main’: main.c:6:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 6 | scanf("%d%d%d%d%d",&n,&s,&x,&y,&z); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | unsigned a[70000],temp[4000]; main.c:6:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 6 | scanf("%d%d%d%d%d",&n,&s,&x,&y,&z); | ^~~~~ main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:29:18: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration] 29 | for(i=1;i<=n;i++)putchar((a[i>>5]>>(i&31))&1?'O':'E');
ソースコード
unsigned a[70000],temp[4000]; n,p,s,x,y,z,i,j; long t; main(){ scanf("%d%d%d%d%d",&n,&s,&x,&y,&z); a[0]=s&1<<1;t=s; for(i=2;i<=n;i++){ t=(t*x+y)%z; a[i>>5]|=(t&1)<<(i&31); } scanf("%*d"); for(;~scanf("%d%d%d%*d",&s,&x,&y);){ x-=s-1; p=s&31;z=32-p; for(i=0,j=s>>5;i<<5<x;i++,j++){temp[i]=a[j]>>p;p?temp[i]|=a[j+1]<<z:0;} z=32-(x&31); temp[i-1]=temp[i-1]<<z>>z; p=y&31;z=32-p; for(i=0,j=y>>5;i<<5<x;i++,j++){a[j]^=temp[i]<<p;p?a[j+1]^=temp[i]>>z:0;} } for(i=1;i<=n;i++)putchar((a[i>>5]>>(i&31))&1?'O':'E'); return 0; }