結果
| 問題 |
No.8106 Toptree is but what is not.
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2023-03-30 09:19:09 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 115 ms / 4,000 ms |
| コード長 | 355 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 28,160 KB |
| 最終ジャッジ日時 | 2025-02-11 19:04:47 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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; }
| ~~~~~^~~~~~~~~~~~
ソースコード
#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());
}
}
Nachia