結果
| 問題 |
No.5017 Tool-assisted Shooting
|
| コンテスト | |
| ユーザー |
platinum
|
| 提出日時 | 2023-06-19 22:07:40 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| コード長 | 616 bytes |
| コンパイル時間 | 1,953 ms |
| コンパイル使用メモリ | 197,092 KB |
| 実行使用メモリ | 24,372 KB |
| スコア | 74,830 |
| 平均クエリ数 | 399.74 |
| 最終ジャッジ日時 | 2023-07-16 13:30:12 |
| 合計ジャッジ時間 | 10,937 ms |
|
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 100 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
constexpr int width = 25; // フィールドの幅
constexpr int height = 60; // フィールドの高さ
constexpr int max_turn = 1000; // ゲームの最大ターン数
int main(){
for(int turn = 1; turn <= max_turn; turn++) {
// 入力の受け取り
int n;
cin >> n;
if(n == -1) return 0;
assert(n >= 0 && n <= width);
int prev_x = -1;
for(int i = 0; i < n; i++) {
int h, p, x;
cin >> h >> p >> x;
assert(h >= 1 && p >= 0);
assert(x >= 0 && x < width);
assert(x > prev_x);
prev_x = x;
}
cout << 'S' << endl;
}
return 0;
}
platinum