結果

問題 No.3379 Third Max (C++)
コンテスト
ユーザー 259-Momone
提出日時 2025-11-13 03:10:00
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 112 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-11-22 12:30:52
合計ジャッジ時間 1,684 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<cstdio>
      |  ^~~~~~
main.cpp:2:10: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | long a,b;main(){while(~scanf("%d",&b))a+=1l<<4*b;b=1;while(a/=16)b+=a/15%16>2;printf("%d\n",b);}
      |          ^~~~
main.cpp: In function ‘int main()’:
main.cpp:2:32: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
    2 | long a,b;main(){while(~scanf("%d",&b))a+=1l<<4*b;b=1;while(a/=16)b+=a/15%16>2;printf("%d\n",b);}
      |                               ~^  ~~
      |                                |  |
      |                                |  long int*
      |                                int*
      |                               %ld
main.cpp:2:88: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    2 | long a,b;main(){while(~scanf("%d",&b))a+=1l<<4*b;b=1;while(a/=16)b+=a/15%16>2;printf("%d\n",b);}
      |                                                                                       ~^    ~
      |                                                                                        |    |
      |                                                                                        int  long int
      |                                                                                       %ld

ソースコード

diff #
raw source code

#import<cstdio>
long a,b;main(){while(~scanf("%d",&b))a+=1l<<4*b;b=1;while(a/=16)b+=a/15%16>2;printf("%d\n",b);}
0