結果

問題 No.318 学学学学学
ユーザー syaro
提出日時 2016-02-23 22:37:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 1,794 ms
コンパイル使用メモリ 167,000 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-06-22 16:21:17
合計ジャッジ時間 5,045 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:2:16: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    2 | int N,i=-2,j,a;main(){std::map<int,int>e,s,A;for(;++i<N;~i?e[A[i]=a]=i:N=a)std::cin>>a;for(;s[a=A[j]]=j<N;e[a]<j&&s.erase(a))std::cout<<s.rbegin()->first<<(N>++j?" ":"\n");}
      |                ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
int N,i=-2,j,a;main(){std::map<int,int>e,s,A;for(;++i<N;~i?e[A[i]=a]=i:N=a)std::cin>>a;for(;s[a=A[j]]=j<N;e[a]<j&&s.erase(a))std::cout<<s.rbegin()->first<<(N>++j?" ":"\n");}
0