結果

問題 No.511 落ちゲー 〜手作業のぬくもり〜
ユーザー LayCurseLayCurse
提出日時 2017-04-30 02:49:46
言語 cLay
(20231016-1)
結果
AC  
実行時間 175 ms / 4,000 ms
コード長 490 bytes
コンパイル時間 3,798 ms
コンパイル使用メモリ 187,040 KB
実行使用メモリ 15,716 KB
最終ジャッジ日時 2023-08-16 03:07:53
合計ジャッジ時間 6,608 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,608 KB
testcase_01 AC 2 ms
7,468 KB
testcase_02 AC 2 ms
7,452 KB
testcase_03 AC 3 ms
7,604 KB
testcase_04 AC 3 ms
7,508 KB
testcase_05 AC 3 ms
7,456 KB
testcase_06 AC 2 ms
7,424 KB
testcase_07 AC 3 ms
7,456 KB
testcase_08 AC 2 ms
7,580 KB
testcase_09 AC 2 ms
7,516 KB
testcase_10 AC 3 ms
7,612 KB
testcase_11 AC 2 ms
7,456 KB
testcase_12 AC 2 ms
7,468 KB
testcase_13 AC 2 ms
7,584 KB
testcase_14 AC 3 ms
7,576 KB
testcase_15 AC 2 ms
7,532 KB
testcase_16 AC 2 ms
7,456 KB
testcase_17 AC 2 ms
7,524 KB
testcase_18 AC 2 ms
7,472 KB
testcase_19 AC 2 ms
7,592 KB
testcase_20 AC 2 ms
7,608 KB
testcase_21 AC 3 ms
7,548 KB
testcase_22 AC 3 ms
7,432 KB
testcase_23 AC 3 ms
7,564 KB
testcase_24 AC 2 ms
7,520 KB
testcase_25 AC 3 ms
7,564 KB
testcase_26 AC 3 ms
7,604 KB
testcase_27 AC 3 ms
7,532 KB
testcase_28 AC 3 ms
7,532 KB
testcase_29 AC 175 ms
15,692 KB
testcase_30 AC 153 ms
15,464 KB
testcase_31 AC 134 ms
15,464 KB
testcase_32 AC 127 ms
15,696 KB
testcase_33 AC 101 ms
10,900 KB
testcase_34 AC 87 ms
10,116 KB
testcase_35 AC 172 ms
15,716 KB
testcase_36 AC 174 ms
15,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int A[100000], B[100000], X[100000];
{
  int i, k;
  ll N, W, H;
  segtree<ll> t;
  pair<ll,int> mn;
  ll res[2] = {0LL, 0LL};

  rd(N,W,H,(A,B,X)(N));
  X[0..N-1]--;
  
  t.malloc(W, 1);

  rep(i,N){
    t.add(X[i], X[i]+A[i], -B[i]);
    for(;;){
      mn = t.getMin(X[i], X[i]+A[i]);
      if(mn.first > -H) break;
      k = mn.second;
      res[i%2]++;
      t.add(k,k+1,1d18);
    }
  }

  if(res[0] > res[1]) wt("A");
  if(res[0] < res[1]) wt("B");
  if(res[0]==res[1]) wt("DRAW");
}
0