結果
問題 | No.305 鍵(2) |
ユーザー |
|
提出日時 | 2016-11-26 17:32:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 1,798 ms |
コンパイル使用メモリ | 169,224 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 92.62 |
最終ジャッジ日時 | 2024-07-17 00:38:29 |
合計ジャッジ時間 | 2,628 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int ans = 0; for( int i = ( int ) 1e9; i; i /= 10 ){ vector< int > match( 10 ); for( int j = 0; j < 10; ++j ){ cout << setw( 10 ) << setfill( '0' ) << j * i << endl; int m; string r; cin >> m >> r; if( r == "unlocked" ) exit( 0 ); match[ j ] = m; } ans = ans * 10 + max_element( match.begin(), match.end() ) - match.begin(); } cout << setw( 10 ) << setfill( '0' ) << ans << endl; int m; string r; cin >> m >> r; return 0; }