結果
問題 | No.893 お客様を誘導せよ |
ユーザー |
![]() |
提出日時 | 2025-03-28 13:55:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 466 bytes |
コンパイル時間 | 2,341 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-28 13:55:28 |
合計ジャッジ時間 | 1,382 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&cashier); | ~~~~~^~~~~~~~~~~~~~~ main.cpp:15:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d",&people); | ~~~~~^~~~~~~~~~~~~~ main.cpp:17:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | scanf("%d",&arr[i][j]); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int cashier = 0; scanf("%d",&cashier); int arr[cashier][1000]; for(int i = 0;i < cashier;i ++){ for(int j = 0;j < 1000;j ++){ arr[i][j] = 0; } } for(int i = 0;i < cashier;i ++){ int people = 0; scanf("%d",&people); for(int j = 0;j < people;j ++){ scanf("%d",&arr[i][j]); } } for(int i = 0;i < 1000;i ++){ for(int j = 0;j < cashier;j ++){ if(arr[j][i] != 0){ printf("%d ",arr[j][i]); } } } }