結果

問題 No.246 質問と回答
ユーザー どららどらら
提出日時 2015-07-17 23:28:52
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 758 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 72,444 KB
実行使用メモリ 24,504 KB
最終ジャッジ日時 2023-09-23 07:13:49
合計ジャッジ時間 87,967 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 TLE -
testcase_03 TLE -
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <iostream>
#include <queue>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;

int main(){
  int iter = 1;
  int res = 1;
  while(iter <= 1000000){
    printf("? %d\n", iter);
    fflush(stdout);
    scanf("%d", &res);
    if(res==0){
      iter--;
      break;
    }
    iter++;
  }

  printf("! %d\n", iter);
  fflush(stdout);

  return 0;
}
0