結果

問題 No.1149 色塗りゲーム
ユーザー yutasyutas
提出日時 2020-08-07 23:27:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 949 bytes
コンパイル時間 1,459 ms
コンパイル使用メモリ 165,708 KB
実行使用メモリ 24,372 KB
平均クエリ数 19.82
最終ジャッジ日時 2023-09-24 05:06:05
合計ジャッジ時間 6,793 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
23,316 KB
testcase_01 AC 37 ms
24,000 KB
testcase_02 AC 34 ms
23,340 KB
testcase_03 AC 33 ms
23,484 KB
testcase_04 AC 34 ms
23,400 KB
testcase_05 AC 34 ms
23,808 KB
testcase_06 AC 34 ms
23,628 KB
testcase_07 AC 33 ms
23,616 KB
testcase_08 AC 36 ms
23,328 KB
testcase_09 AC 33 ms
24,360 KB
testcase_10 AC 39 ms
23,364 KB
testcase_11 AC 37 ms
23,628 KB
testcase_12 AC 34 ms
24,348 KB
testcase_13 AC 34 ms
24,108 KB
testcase_14 AC 35 ms
23,628 KB
testcase_15 AC 34 ms
23,340 KB
testcase_16 AC 33 ms
24,180 KB
testcase_17 AC 35 ms
23,328 KB
testcase_18 AC 34 ms
23,364 KB
testcase_19 AC 36 ms
23,988 KB
testcase_20 AC 37 ms
24,348 KB
testcase_21 AC 36 ms
23,952 KB
testcase_22 AC 39 ms
23,952 KB
testcase_23 AC 39 ms
23,352 KB
testcase_24 AC 39 ms
23,808 KB
testcase_25 AC 41 ms
24,372 KB
testcase_26 AC 37 ms
23,424 KB
testcase_27 AC 37 ms
23,316 KB
testcase_28 AC 37 ms
24,012 KB
testcase_29 AC 38 ms
23,472 KB
testcase_30 AC 71 ms
23,616 KB
testcase_31 AC 66 ms
23,412 KB
testcase_32 AC 67 ms
23,820 KB
testcase_33 AC 71 ms
23,796 KB
testcase_34 AC 76 ms
23,364 KB
testcase_35 AC 74 ms
23,580 KB
testcase_36 AC 79 ms
23,976 KB
testcase_37 AC 80 ms
23,976 KB
testcase_38 AC 83 ms
23,976 KB
testcase_39 AC 84 ms
23,484 KB
testcase_40 AC 93 ms
23,616 KB
testcase_41 AC 83 ms
24,300 KB
testcase_42 AC 84 ms
24,108 KB
testcase_43 AC 86 ms
23,352 KB
testcase_44 AC 89 ms
24,180 KB
testcase_45 AC 89 ms
23,580 KB
testcase_46 AC 91 ms
23,640 KB
testcase_47 AC 93 ms
23,364 KB
testcase_48 AC 96 ms
23,616 KB
testcase_49 AC 98 ms
23,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<int, ll> Pil;
typedef pair<ll, ll> Pll;
typedef pair<ll, int> Pli;

#define fi first
#define se second

const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll MOD3 = 1812447359;
const ll INF = 1ll << 62;
const double PI = 2 * asin(1);

void yes() {printf("yes\n");}
void no() {printf("no\n");}
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}


int main(){
  int N; cin >> N;

  if (N % 2 == 0){
    cout << 2 << " " << (N+1) / 2 << endl;
  }else{
    cout << 1 << " " << (N+1) / 2 << endl;
  }

  for (int i = 0; i < N; i++){
    int T; cin >> T;
    if (T != 3) return 0;
    int K, X; cin >> K >> X;

    cout << K << " ";
    if (K == 1){
      cout << (N+1) - X << endl;
    }else{
      cout << N - X << endl;
    }
  }

  return 0;
}
0