結果
| 問題 | No.1610 She Loves Me, She Loves Me Not, ... |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2021-08-13 15:15:01 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 219 ms |
| コンパイル使用メモリ | 28,412 KB |
| 最終ジャッジ日時 | 2026-02-22 07:49:36 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:11:1: error: return type defaults to 'int' [-Wimplicit-int]
11 | main(){
| ^~~~
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'read'; did you mean 'rd'? [-Wimplicit-function-declaration]
12 | read(0,rbuf,sizeof rbuf);
| ^~~~
| rd
main.c:35:17: error: implicit declaration of function 'write' [-Wimplicit-function-declaration]
35 | write(1,"Yes",3);
| ^~~~~
main.c:39:9: error: implicit declaration of function '_exit' [-Wimplicit-function-declaration]
39 | _exit(0);
| ^~~~~
main.c:39:9: warning: incompatible implicit declaration of built-in function '_exit' [-Wbuiltin-declaration-mismatch]
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#define rd_skip() while(*rp++>=48)
#define rd(v) long v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}
char rbuf[64<<10];
short g[5000][5001];
long d[5001];
main(){
read(0,rbuf,sizeof rbuf);
char*rp=rbuf;
rd(n);
rd_skip();
while(*rp){
rd(a);
rd(b);
g[d[a]++][a]=b;
g[d[b]++][b]=a;
}
long z=0;
for(long i=1;i<=n;++i){
long j=i;
while(d[j]==1){
--d[j];
z^=1;
long k=0,l=0;
while(!d[l=g[k++][j]]);
j=l;
--d[j];
}
}
if(z){
write(1,"Yes",3);
}else{
write(1,"No",2);
}
_exit(0);
}
tails