結果
| 問題 |
No.1370 置換門松列
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2019-10-06 18:04:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
J_TLE
(最初)
|
| 実行時間 | - |
| コード長 | 929 bytes |
| コンパイル時間 | 1,604 ms |
| コンパイル使用メモリ | 165,776 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 04:14:00 |
| 合計ジャッジ時間 | 7,428 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 5 |
| other | WA * 25 |
ソースコード
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int read_int() {
int c = getchar();
int res = 0, sign = 0;
if (c == '-') sign = 1;
else if (c >= '0' && c <= '9') res = c - '0';
else assert(0);
while (1) {
c = getchar();
if (c < '0' || c > '9') break;
assert(res <= 200000000); // no overflow
res = res * 10 + c - '0';
}
ungetc(c, stdin);
return sign ? -res : res;
}
void read_linebreak() {
int c = getchar();
if (c == '\r') c = getchar();
assert(c == '\n');
}
int main() {
int n = read_int();
assert(3 <= n && n <= 100000);
assert(getchar() == ' ');
int m = read_int();
assert(1 <= n && n <= 100000);
read_linebreak();
for (int i = 0; i < n; i++) {
if (i) assert(getchar() == ' ');
int a = read_int();
assert(1 <= a && a <= m);
}
int c = getchar();
if (c != EOF) {
if (c == '\r') c = getchar();
assert(c == '\n');
}
assert(getchar() == EOF);
return 0;
}
QCFium