結果
| 問題 |
No.490 yukiソート
|
| ユーザー |
toto
|
| 提出日時 | 2025-03-25 17:01:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 28,792 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-25 17:01:58 |
| 合計ジャッジ時間 | 1,862 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 3 WA * 31 |
コンパイルメッセージ
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("%lld",&val);
| ~~~~~^~~~~~~~~~~~~
main.cpp:9:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld",&num[i]);
| ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long val = 0;
scanf("%lld",&val);
long long num[val];
for(long long i = 0;i < val;i ++){
scanf("%lld",&num[i]);
}
for(long long i = 0;i < val;i ++){
for(long long j = 0;j < val;j ++){
long long tmp = num[i];
num[i] = num[j];
num[j] = tmp;
}
}
for(long long i = 0;i < val;i ++){
printf("%lld ",num[i]);
}
}
toto