提出 #883786
ソースコード 拡げる
#include <iostream>
#include <algorithm>
#include <numeric>
#define SIZE (100000)
#define N_MAX (100000)
using namespace std;
int main(int argc, char const *argv[]) {
int N;
cin >> N;
int state[SIZE+1];
for (size_t i = 1; i <= SIZE; i++) state[i] = 0;
unsigned long S[N_MAX];
int C[N_MAX];
for (size_t i = 0; i < N; i++) cin >> S[i] >> C[i];
for (size_t i = 0; i < N; i++) {
while(C[i] > 0) {
if (state[S[i]] == 0) {
state[S[i]] = 1;
C[i]--;
}
S[i]++;
}
cout << S[i] - 1 << endl;
}
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | D - マスと駒と色塗り |
| ユーザ | tdmhk1 |
| 言語 | C++14 (Clang++ 3.4) |
| 得点 | 0 |
| コード長 | 586 Byte |
| 結果 | TLE |
| 実行時間 | 2038 ms |
| メモリ | 2800 KiB |
ジャッジ結果
| セット名 | Sample | Dataset1 | Dataset2 | Dataset3 | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 35 | 0 / 40 | 0 / 25 | ||||||||||||||||||
| 結果 |
|
|
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt |
| Dataset1 | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt |
| Dataset2 | sample-01.txt, sample-02.txt, sample-03.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, 02-09.txt, 02-10.txt, 02-11.txt, 02-12.txt |
| Dataset3 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, 02-09.txt, 02-10.txt, 02-11.txt, 02-12.txt, 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt, 03-07.txt, 03-08.txt, 03-09.txt, 03-10.txt, 03-11.txt, 03-12.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | TLE | 2038 ms | 2112 KiB |
| 01-02.txt | TLE | 2038 ms | 2736 KiB |
| 01-03.txt | TLE | 2038 ms | 2800 KiB |
| 01-04.txt | AC | 179 ms | 2116 KiB |
| 01-05.txt | AC | 32 ms | 1532 KiB |
| 01-06.txt | AC | 38 ms | 1528 KiB |
| 01-07.txt | AC | 94 ms | 1596 KiB |
| 01-08.txt | AC | 553 ms | 1728 KiB |
| 01-09.txt | AC | 1130 ms | 2364 KiB |
| 02-01.txt | RE | 415 ms | 1508 KiB |
| 02-02.txt | RE | 286 ms | 1408 KiB |
| 02-03.txt | RE | 285 ms | 1472 KiB |
| 02-04.txt | AC | 35 ms | 1472 KiB |
| 02-05.txt | RE | 291 ms | 1404 KiB |
| 02-06.txt | RE | 290 ms | 1460 KiB |
| 02-07.txt | RE | 290 ms | 1528 KiB |
| 02-08.txt | RE | 289 ms | 1408 KiB |
| 02-09.txt | RE | 291 ms | 1528 KiB |
| 02-10.txt | RE | 289 ms | 1460 KiB |
| 02-11.txt | RE | 290 ms | 1444 KiB |
| 02-12.txt | RE | 289 ms | 1528 KiB |
| 03-01.txt | RE | 438 ms | 2644 KiB |
| 03-02.txt | RE | 437 ms | 2592 KiB |
| 03-03.txt | RE | 429 ms | 2624 KiB |
| 03-04.txt | TLE | 2037 ms | 2748 KiB |
| 03-05.txt | RE | 384 ms | 2600 KiB |
| 03-06.txt | RE | 423 ms | 2624 KiB |
| 03-07.txt | RE | 426 ms | 2616 KiB |
| 03-08.txt | RE | 397 ms | 2644 KiB |
| 03-09.txt | RE | 398 ms | 2644 KiB |
| 03-10.txt | RE | 293 ms | 1600 KiB |
| 03-11.txt | RE | 428 ms | 2624 KiB |
| 03-12.txt | RE | 426 ms | 2644 KiB |
| sample-01.txt | AC | 31 ms | 1472 KiB |
| sample-02.txt | AC | 31 ms | 1404 KiB |
| sample-03.txt | RE | 286 ms | 1472 KiB |