結果
| 問題 |
No.1086 桁和の桁和2
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2020-06-16 13:43:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,312 bytes |
| コンパイル時間 | 1,520 ms |
| コンパイル使用メモリ | 167,292 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-03 11:51:12 |
| 合計ジャッジ時間 | 4,125 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 5 |
| other | WA * 31 |
ソースコード
#include <bits/stdc++.h>
/* strict input checker */
template<typename Integer = int> Integer read_int() {
static_assert(std::numeric_limits<Integer>::is_specialized);
int c = getchar(), sign = 0;
Integer res = 0;
if (c == '-') sign = 1, c = getchar();
assert('0' <= c && c <= '9');
if (sign) assert(c != '0');
res = c - '0';
while (1) {
c = getchar();
if (c < '0' || c > '9') break;
assert(res < std::numeric_limits<Integer>::max() / 10); // avoid overflow
assert(res); // no leading-zero
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();
read_linebreak();
assert(1 <= n && n <= 100000);
int64_t l[n], r[n];
for (int i = 0; i < n; i++) {
if (i) assert(getchar() == ' ');
l[i] = read_int<int64_t>();
}
read_linebreak();
for (int i = 0; i < n; i++) {
if (i) assert(getchar() == ' ');
r[i] = read_int<int64_t>();
}
read_linebreak();
for (int i = 0; i < n; i++) assert(0 <= l[i] && l[i] < r[i] && r[i] <= 1000000000000000000);
for (int i = 0; i < n; i++) {
if (i) assert(getchar() == ' ');
int d = read_int();
assert(0 <= d && d < 10);
}
read_linebreak();
assert(getchar() == EOF);
return 0;
}
QCFium