結果

問題 No.3379 Third Max (C++)
コンテスト
ユーザー alcea
提出日時 2025-11-22 13:54:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 93 bytes
コンパイル時間 2,972 ms
コンパイル使用メモリ 143,980 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-11-22 13:54:23
合計ジャッジ時間 4,370 ms
ジャッジサーバーID
(参考情報)
judge7 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<atcoder/all>
      |  ^~~~~~
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);}
      |      ^

ソースコード

diff #
raw source code

#import<atcoder/all>
char s[9];main(){scanf("%[^a]",s);std::sort(s,s+19);s[17]=0;puts(s+16);}
0