結果

問題 No.39 桁の数字を入れ替え
コンテスト
ユーザー testestest
提出日時 2015-08-15 13:38:40
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 5,000 ms
+ 678µs
コード長 136 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 43 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-24 02:15:23
合計ジャッジ時間 1,902 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:12: warning: data definition has no type or storage class
    1 | char s[99];i,m,k;main(j){for(gets(s);!m&&(m=s[j=i]);i++){for(;s[++j];s[j]<m||(m=s[k=j]));m=s[i]<m?s[i]^=s[k]^=s[i]^=s[k]:0;}i=!puts(s);}
      |            ^
/usr/bin/ld: /tmp/ccqfoXaT.o: in function `main':
main.c:(.text.startup+0x12): 警告: the `gets' function is dangerous and should not be used.

ソースコード

diff #
raw source code

char s[99];i,m,k;main(j){for(gets(s);!m&&(m=s[j=i]);i++){for(;s[++j];s[j]<m||(m=s[k=j]));m=s[i]<m?s[i]^=s[k]^=s[i]^=s[k]:0;}i=!puts(s);}
0