結果
| 問題 | No.3544 Robot on Torus (C++) |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-05-16 21:04:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 506 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 6,400 KB |
| スコア | 426 |
| 最終ジャッジ日時 | 2026-05-16 21:04:20 |
| 合計ジャッジ時間 | 8,480 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 1 |
| other | AC * 2 WA * 20 RE * 5 |
コンパイルメッセージ
main.cpp:1:2: warning: '#import' is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
main.cpp:3:19: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | int H,W,i,j,L,s,t;main(){std::cin>>H>>W;char S[H][W];r(s,H)std::cin>>S[s];r(i,H)r(j,W)if(S[i][j]>81){r(L,H*W)if(S[s=(i+L)%H][t=(j+L)%W]&1)exit(printf("%d %d",s?:H,t?:W));puts("loop");}}
| ^~~~
ソースコード
#import<iostream>
#define r(i,H)for(;i<H;i++)
int H,W,i,j,L,s,t;main(){std::cin>>H>>W;char S[H][W];r(s,H)std::cin>>S[s];r(i,H)r(j,W)if(S[i][j]>81){r(L,H*W)if(S[s=(i+L)%H][t=(j+L)%W]&1)exit(printf("%d %d",s?:H,t?:W));puts("loop");}}