結果
| 問題 | No.3544 Robot on Torus (C++) |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-05-16 21:21:28 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 685 ms |
| コンパイル使用メモリ | 80,640 KB |
| 実行使用メモリ | 6,400 KB |
| スコア | 424 |
| 最終ジャッジ日時 | 2026-05-16 21:21:39 |
| 合計ジャッジ時間 | 5,055 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
コンパイルメッセージ
main.cpp:1:2: warning: '#import' is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
main.cpp:3:13: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | int H,W,s,t;main(){std::cin>>H>>W;char S[H][W];r(i,H)std::cin>>S[i];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(int i=0;i<H;i++)
int H,W,s,t;main(){std::cin>>H>>W;char S[H][W];r(i,H)std::cin>>S[i];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");}}