結果
| 問題 |
No.3379 Third Max (C++)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-19 19:50:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 95 bytes |
| コンパイル時間 | 1,898 ms |
| コンパイル使用メモリ | 194,752 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2025-11-22 12:35:05 |
| 合計ジャッジ時間 | 3,482 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<bits/stdc++.h>
| ^~~~~~
main.cpp:2:11: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:2:23: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ~~~~~^~~~~~~~~~~
main.cpp:2:58: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ~~~~~^~
main.cpp:2:6: note: at offset 17 into destination object ‘s’ of size 9
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ^
main.cpp:2:65: warning: ‘int puts(const char*)’ reading 1 or more bytes from a region of size 0 [-Wstringop-overread]
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ~~~~^~~~~~
main.cpp:2:6: note: at offset 16 into source object ‘s’ of size 9
2 | char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
| ^
ソースコード
#import<bits/stdc++.h>
char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}