結果
| 問題 | No.1716 Bonus Nim |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2021-11-17 00:23:20 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 752 bytes |
| 記録 | |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 28,412 KB |
| 最終ジャッジ日時 | 2026-02-22 08:29:27 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:20:1: error: return type defaults to 'int' [-Wimplicit-int]
20 | main(){
| ^~~~
main.c: In function 'main':
main.c:21:17: error: too many arguments to function 'mmap'; expected 0, have 6
21 | char*rp=mmap(0l,1l<<25,1,2,0,0ll);
| ^~~~ ~~
main.c:4:6: note: declared here
4 | char*mmap();
| ^~~~
main.c:32:42: warning: multi-character character constant [-Wmultichar]
32 | *(long*)wp=(long)'\ne'<<32|'cilA';
| ^~~~~
main.c:32:52: warning: multi-character character constant [-Wmultichar]
32 | *(long*)wp=(long)'\ne'<<32|'cilA';
| ^~~~~~
main.c:35:35: warning: multi-character character constant [-Wmultichar]
35 | *(int*)wp='\nboB';
| ^~~~~~~
main.c:39:9: error: implicit declaration of function 'write' [-Wimplicit-function-declaration]
39 | write(1,wbuf,wp-wbuf);
| ^~~~~
main.c:40:9: error: implicit declaration of function '_exit' [-Wimplicit-function-declaration]
40 | _exit(0);
| ^~~~~
main.c:40:9: warning: incompatible implicit declaration of built-in function '_exit' [-Wbuiltin-declaration-mismatch]
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
char*mmap();
char wbuf[1<<25];
#define rd_skip() while(*rp++>=48)
#define rd(v) long v=0;{long _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}
// splitmix64
// https://yukicoder.me/submissions/709979
static inline
unsigned long splitmix64(unsigned long x) {
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
return x ^ (x >> 31);
}
main(){
char*rp=mmap(0l,1l<<25,1,2,0,0ll);
char*wp=wbuf;
rd_skip();
while(*rp){
rd(n);
unsigned long h=0;
while(n--){
rd(a);
h^=splitmix64(a);
}
if(h){
*(long*)wp=(long)'\ne'<<32|'cilA';
wp+=6;
}else{
*(int*)wp='\nboB';
wp+=4;
}
}
write(1,wbuf,wp-wbuf);
_exit(0);
}
tails