結果
| 問題 | 
                            No.304 鍵(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             latte0119
                         | 
                    
| 提出日時 | 2015-11-27 22:32:00 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 57 ms / 2,000 ms | 
| コード長 | 583 bytes | 
| コンパイル時間 | 1,504 ms | 
| コンパイル使用メモリ | 156,808 KB | 
| 実行使用メモリ | 25,220 KB | 
| 平均クエリ数 | 309.17 | 
| 最終ジャッジ日時 | 2024-07-16 20:41:05 | 
| 合計ジャッジ時間 | 2,052 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
   18 |         printf("%03d\n",i);
      |                 ~~~^    ~
      |                    |    |
      |                    int  long long int
      |                 %03lld
main.cpp:21:17: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[100]’ [-Wformat=]
   21 |         scanf("%s",&s);
      |                ~^  ~~
      |                 |  |
      |                 |  char (*)[100]
      |                 char*
main.cpp:21:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   21 |         scanf("%s",&s);
      |         ~~~~~^~~~~~~~~
            
            ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int>pint;
typedef vector<int>vint;
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
template<class T,class U>void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>void chmax(T &t,U f){if(t<f)t=f;}
signed main(){
    rep(i,1000){
        printf("%03d\n",i);
        fflush(stdout);
        char s[100];
        scanf("%s",&s);
        if(s[0]=='u')break;
    }
    return 0;
}
            
            
            
        
            
latte0119