Advertisement
midnight_sun

Untitled

Dec 25th, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
  3. using namespace std;
  4. int a[] = { 0,4,4 }, b[] = { 3 }, c[] = { 2,2,6 }, d[] = { 1,5 };
  5. long long int cnt[5] = {}, k = 100000000;
  6. int main() {
  7.     fastio;
  8.     srand(time(NULL));
  9.     for (int i = 0;i<k;i++) {
  10.         int a1 = a[rand() % 3], b1 = b[rand() % 1], c1 = c[rand() % 3], d1 = d[rand() % 2];
  11.         if (a1 > b1) cnt[1]++;
  12.         if (b1 > c1) cnt[2]++;
  13.         if (c1 > d1) cnt[3]++;
  14.         if (d1 > a1) cnt[4]++;
  15.         if (i % 10000000==0) cout << "*";
  16.     }
  17.     cout << "\n";
  18.     cout << "Num of TESTCASE : " << k << "\n";
  19.  
  20.     for (int i = 1; i < 5; i++) {
  21.         if (i == 1) cout << "CASE A vs B(WIN/LOSE/RATE) - main_(A) : " << cnt[1] << " / " << k - cnt[1] << " / " << long double(cnt[1] * 100 / k) << "%\n";
  22.         if (i == 2) cout << "CASE B vs C(WIN/LOSE/RATE) - main_(B) : " << cnt[2] << " / " << k - cnt[2] << " / " << long double(cnt[2] * 100 / k) << "%\n";
  23.         if (i == 3) cout << "CASE C vs D(WIN/LOSE/RATE) - main_(C) : " << cnt[3] << " / " << k - cnt[3] << " / " << long double(cnt[3] * 100 / k) << "%\n";
  24.         if (i == 4) cout << "CASE D vs A(WIN/LOSE/RATE) - main_(D) : " << cnt[4] << " / " << k - cnt[4] << " / " << long double(cnt[4] * 100 / k) << "%\n";
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement