結果
| 問題 | No.429 CupShuffle |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2021-02-22 19:42:11 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 597 bytes |
| 記録 | |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 28,188 KB |
| 最終ジャッジ日時 | 2026-02-22 06:51:02 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:7:1: warning: data definition has no type or storage class
7 | a[123456];
| ^
main.c:7:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:8:1: warning: data definition has no type or storage class
8 | b[123456];
| ^
main.c:8:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:9:1: warning: data definition has no type or storage class
9 | c[123456];
| ^
main.c:9:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:10:1: warning: data definition has no type or storage class
10 | d[123456];
| ^
main.c:10:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int]
12 | main(){
| ^~~~
main.c: In function 'main':
main.c:13:17: error: too many arguments to function 'mmap'; expected 0, have 6
13 | char*rp=mmap(0l,1l<<28,1,2,0,0ll);
| ^~~~ ~~
main.c:4:6: note: declared here
4 | char*mmap();
| ^~~~
main.c:40:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
40 | printf("%d ",i);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | #pragma GCC optimize("Ofast")
main.c:40:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
40 | printf("%d ",i);
| ^~~~~~
main.c:40:25: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
char*mmap();
#define RD(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}
a[123456];
b[123456];
c[123456];
d[123456];
main(){
char*rp=mmap(0l,1l<<28,1,2,0,0ll);
RD(n);
RD(k);
RD(x);
for(int i=0;i<k;++i){
RD(ai);
a[i]=ai;
RD(bi);
b[i]=bi;
}
for(int i=1;i<=n;++i){
RD(ci);
c[i]=ci;
d[i]=i;
}
for(int i=0;i<x;++i){
int t=d[a[i]];
d[a[i]]=d[b[i]];
d[b[i]]=t;
}
for(int i=k;i-->x;){
int t=c[a[i]];
c[a[i]]=c[b[i]];
c[b[i]]=t;
}
for(int i=1;i<=n;++i){
if(c[i]!=d[i]){
printf("%d ",i);
}
}
}
tails