QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#869839#8619. Interactive Casinoucup-team087#WA 3ms3584kbC++142.2kb2025-01-25 13:39:412025-01-25 13:39:42

Judging History

你现在查看的是最新测评结果

  • [2025-01-25 13:39:42]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3584kb
  • [2025-01-25 13:39:41]
  • 提交

answer

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")


const double C = 0.4;

void exper() {
  mt19937_64 rng(58);
  int fail = 0;
  for (int i = 0; i < 1000; ++i) {
    int m = 1000;
    for (int t = 0; t < 1000; ++t) {
      const int b = 1 + rng() % m;
// cerr<<i<<" "<<t<<" "<<m<<" "<<b<<endl;
      if (b <= m * C) {
        if (rng() & 1) {
          m -= b;
        } else {
          m += 2*b;
        }
      }
      if (m <= 0) {
        ++fail;
        goto done;
      }
      if (m > 10000) {
        // cerr << i << " " << t << " " << m << endl;
        goto done;
      }
    }
    ++fail;
   done:{}
  }
  cerr << "fail = " << fail << endl;
}

int main() {
  exper(); return 0;
  
  int T;
  scanf("%d", &T);
  for (; T--; ) {
    char S[10];
    int M, B;
    scanf("%s%d%d", S, &M, &B);
    if (string(S) == "WIN" || string(S) == "LOSE") {
      break;
    }
    puts((B <= M * C) ? "PLAY" : "SKIP");
    fflush(stdout);
  }
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 3ms
memory: 3584kb

input:

5
ROUND 1000 43

output:


result:

wrong answer format  Unexpected end of file - token expected