結果

問題 No.3106 Toptree is but what is not.
ユーザー 👑 NachiaNachia
提出日時 2023-03-30 09:19:09
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 134 ms / 4,000 ms
コード長 355 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 31,436 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 19:31:23
合計ジャッジ時間 1,138 ms
ジャッジサーバーID
(参考情報)
judge10 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>

int readInt(){ int buf; scanf("%d", &buf); return buf; }

int main(){
    int n = readInt();
    for(int i=0; i<n-1; i++){ readInt(); readInt(); }
    for(int i=0; i<n; i++) readInt();
    int q = readInt();
    for(int i=0; i<q; i++){
        readInt();
        readInt();
        readInt();
        printf("%d\n", readInt());
    }
}
0