提出 #548157
ソースコード 拡げる
#include <iostream>
using namespace std;
#define max 10000
unsigned long long x[max];
int main(){
int N;
cin >> N;
unsigned long long int *koma = new unsigned long long[N];//komaの座標
for (int i = 0; i < N; i++){
int S, C;
cin >> S;
koma[i] = S-1;//駒を0から始めさせたので後で戻す
cin >> C;
int count=0;
while (count < C){
if (x[koma[i] / 72] & 1 << (koma[i] % 72)){
koma[i]++;
}else{
x[koma[i] / 72] += 1 << (koma[i] % 72);
count++;
}
}
}
for (int i = 0; i < N; i++){
cout << koma[i]+1 << endl;
}
delete[] koma;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | D - マスと駒と色塗り |
| ユーザ | gotchman01 |
| 言語 | C++ (GCC 4.9.2) |
| 得点 | 0 |
| コード長 | 643 Byte |
| 結果 | WA |
| 実行時間 | 2036 ms |
| メモリ | 1188 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 | 2035 ms | 928 KiB |
| 01-02.txt | TLE | 2036 ms | 988 KiB |
| 01-03.txt | TLE | 2035 ms | 1188 KiB |
| 01-04.txt | WA | 1833 ms | 1184 KiB |
| 01-05.txt | WA | 27 ms | 800 KiB |
| 01-06.txt | WA | 86 ms | 924 KiB |
| 01-07.txt | WA | 616 ms | 916 KiB |
| 01-08.txt | TLE | 2034 ms | 924 KiB |
| 01-09.txt | TLE | 2036 ms | 1052 KiB |
| 02-01.txt | RE | 288 ms | 920 KiB |
| 02-02.txt | RE | 287 ms | 768 KiB |
| 02-03.txt | RE | 290 ms | 932 KiB |
| 02-04.txt | WA | 37 ms | 916 KiB |
| 02-05.txt | RE | 289 ms | 740 KiB |
| 02-06.txt | RE | 291 ms | 808 KiB |
| 02-07.txt | RE | 287 ms | 800 KiB |
| 02-08.txt | RE | 284 ms | 924 KiB |
| 02-09.txt | RE | 288 ms | 732 KiB |
| 02-10.txt | RE | 284 ms | 920 KiB |
| 02-11.txt | RE | 284 ms | 920 KiB |
| 02-12.txt | RE | 281 ms | 800 KiB |
| 03-01.txt | RE | 284 ms | 796 KiB |
| 03-02.txt | RE | 281 ms | 672 KiB |
| 03-03.txt | RE | 284 ms | 800 KiB |
| 03-04.txt | TLE | 2035 ms | 1056 KiB |
| 03-05.txt | RE | 336 ms | 792 KiB |
| 03-06.txt | RE | 286 ms | 800 KiB |
| 03-07.txt | RE | 286 ms | 800 KiB |
| 03-08.txt | RE | 287 ms | 796 KiB |
| 03-09.txt | RE | 283 ms | 760 KiB |
| 03-10.txt | RE | 287 ms | 932 KiB |
| 03-11.txt | RE | 286 ms | 792 KiB |
| 03-12.txt | RE | 283 ms | 672 KiB |
| sample-01.txt | AC | 26 ms | 800 KiB |
| sample-02.txt | AC | 26 ms | 924 KiB |
| sample-03.txt | RE | 288 ms | 924 KiB |