結果

問題 No.511 落ちゲー 〜手作業のぬくもり〜
ユーザー maimai
提出日時 2017-04-29 00:10:11
言語 Text
(cat 8.3)
結果
WA  
実行時間 -
コード長 3,969 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-10-11 20:41:21
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"

#ifdef WINT_MIN
#define __MAI
#endif

using namespace std;
typedef unsigned int uint;
typedef long long int ll;
typedef unsigned long long int ull;

#define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout<<e<<" ";}cout<<endl;
#define debugm(m) printf("L%d %s is..\n",__LINE__,#m);for(auto v:m){for(auto e:v){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) printf("L%d %s is => ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<<endl;
#define debugaa(m,w,h) printf("L%d %s is..\n",__LINE__,#m);for(int y=0;y<(h);y++){for(int x=0;x<(w);x++){cout<<(m)[x][y]<<" ";}cout<<endl;}
#define debugaar(m,w,h) printf("L%d %s is..\n",__LINE__,#m);for(int y=0;y<(h);y++){for(int x=0;x<(w);x++){cout<<(m)[y][x]<<" ";}cout<<endl;}
#define ALL(v) (v).begin(),(v).end()
#define repeat(l) for(auto cnt=0;cnt<(l);++cnt)
#define BIGINT 0x7FFFFFFF
#define E107 1000000007ll
void printbit(int u) { if (u == 0)cout << 0; else { int s = 0, k = 0; for (; 0<u; u >>= 1, k++)s = (s << 1) | (u & 1); for (; 0<k--; s >>= 1)cout << (s & 1); } }template<typename T1, typename T2>
    ostream& operator <<(ostream &o, const pair<T1, T2> p) { o << "(" << p.first << ":" << p.second << ")"; return o; }

#define TIME chrono::system_clock::now()
#define MILLISEC(t) (chrono::duration_cast<chrono::milliseconds>(t).count())

namespace {
    std::chrono::system_clock::time_point t;
    void tic() { t = TIME; }
    void toc() { fprintf(stderr, "TIME : %lldms\n", MILLISEC(TIME - t)); }
    std::chrono::system_clock::time_point tle = TIME;
#ifdef __MAI
    void safe_tle(int msec) { assert(MILLISEC(TIME - tle) < msec); }
#else
#define safe_tle(k) ;
#endif
}

#ifndef __MAI 
namespace {
    class MaiScanner {
    public:
        template<typename T>
        void input_integer(T& var) {
            var = 0;
            T sign = 1;
            int cc = getchar_unlocked();
            for (; cc<'0' || '9'<cc; cc = getchar_unlocked())
                if (cc == '-') sign = -1;
            for (; '0' <= cc&&cc <= '9'; cc = getchar_unlocked())
                var = (var << 3) + (var << 1) + cc - '0';
            var = var*sign;
        }
        void ign() { getchar_unlocked(); }
        MaiScanner& operator>>(int& var) {
            input_integer<int>(var);
            return *this;
        }
        MaiScanner& operator>>(long long& var) {
            input_integer<long long>(var);
            return *this;
        }
    };
}
MaiScanner scanner;
#else
#define scanner cin
#endif



template<typename T>
class segtree {
    /*------------------------------------------------------*/
    // 
    // 
    //      Let's write the special segment tree !! (訳:挫折しました)
    // 
    // 
    /*------------------------------------------------------*/
};


int width, height;
int m, n;

int main() {
    int i, j, k;
    ll x, y, a, b;

    segtree<ll> field(100000);

    field.fill(0);

    
    cout << field.query_max(1, 10) << endl;

    field.update_rangesum(1, 5,1);
    field.update_rangesum(3, 7, 2);
    field.update_rangesum(4, 8, 4);

    cout << field.query_max(1, 10) << endl;


    return 0;

    scanner >> n >> width >> height;

    ll score_a, score_b;
    score_a = score_b = 0;
    repeat(n) {
        scanner >> a >> b >> x;

        field.update_rangesum(a, a + x, b);
        while (true) {
            int idx = field.query_max_idx(a, a + x);
            ll val = field[idx];
            if (t >= height) {
                if (cnt % 2 == 0) {
                    score_a[idx] += 1;
                }
                else {
                    score_a[idx] += 1;
                }
                field.update_onechange(idx, -1e99);
            }
            else {
                break;
            }
        }
    }

    if (score_a == score_b) {
        cout << "DRAW" << endl;
    }
    else if (score_a < score_b) {
        cout << "B" << endl;
    }
    else {
        cout << "A" << endl;
    }


    return 0;
}
0