結果

問題 No.8106 Toptree is but what is not.
ユーザー 👑 Nachia
提出日時 2023-03-14 14:40:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 27,776 KB
最終ジャッジ日時 2025-02-11 11:08:50
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int readInt()’:
main.cpp:3:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    3 | int readInt(){ int buf; scanf("%d", &buf); return buf; }
      |                         ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>

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

int main(){
    int n = readInt();
    for(int i=1; i<n; i++) 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