結果
| 問題 |
No.142 単なる配列の操作に関する実装問題
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-12-14 02:22:09 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 376 ms |
| コンパイル使用メモリ | 21,504 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-15 12:05:13 |
| 合計ジャッジ時間 | 5,051 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 5 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:5: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:7: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:9: warning: type defaults to ‘int’ in declaration of ‘z’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:11: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:15: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^
main.c:2:20: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | p,s,x,y,z,i,j,m=64;main(n){
| ^~~~
main.c: In function ‘main’:
main.c:2:20: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int]
main.c:3:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
3 | scanf("%d%d%d%d%d%*d",&n,&t,&x,&y,&z);
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | unsigned long a[32000],b[1600],t;
main.c:3:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
3 | scanf("%d%d%d%d%d%*d",&n,&t,&x,&y,&z);
| ^~~~~
main.c:3:1: note: include ‘<stdio
ソースコード
unsigned long a[32000],b[1600],t;
p,s,x,y,z,i,j,m=64;main(n){
scanf("%d%d%d%d%d%*d",&n,&t,&x,&y,&z);
for(;++i<=n;t=(t*x+y)%z)a[i/m]|=t%2<<i%m;
for(;~scanf("%d%d%d%*d",&s,&x,&y);){
x-=s-1;p=s%m;
for(i=0,j=s/m;i*64<x;i++,j++){b[i]=a[j]>>p;p?b[i]|=a[j+1]<<64-p:0;}
z=m-x&m;b[i-1]=b[i-1]<<z>>z;
p=y%64;
for(i=0,j=y/m;i*64<x;i++,j++){a[j]^=b[i]<<p;p?a[j+1]^=b[i]>>64-p:0;}
}
for(i=0;++i<=n;)putchar(a[i/m]>>i%m&1?79:69);
}
testestest