제출 #567990

#제출 시각아이디문제언어결과실행 시간메모리
567990minhcool코알라 (APIO17_koala)C++17
4 / 100
11 ms360 KiB
#include "koala.h" #include<bits/stdc++.h> using namespace std; //#define int long long #define fi first #define se second #define pb push_back #define mp make_pair #define foru(i, l, r) for(int i = l; i <= r; i++) #define ford(i, r, l) for(int i = r; i >= l; i--) typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<ii, ii> iiii; //const int N = ; const int oo = 1e18 + 7, mod = 1e9 + 7; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int rnd(int l, int r){ int temp = rng() % (r - l + 1); temp = (temp + (r - l + 1)) % (r - l + 1); return temp + l; } int minValue(int N, int W) { int B[105], R[105]; for(int i = 0; i < N; i++) B[i] = 0; B[0] = 1; playRound(B, R); //for(int i = 0; i < N; i++) cout << B[i] << " " << R[i] << "\n"; for(int i = 0; i < N; i++) if(R[i] <= B[i]) return i; //return; } int maxValue(int N, int W) { return 0; } vector<int> nums[16][105]; void prep(){ for(int i = 1; i <= 15; i++){ for(int j = 0; j < (1LL << i); j++){ vector<int> temp; int sum = 0; for(int k = 0; k < 15; k++){ if(j & (1LL << k)){ temp.pb(k + 1); sum += k + 1; } } if(!nums[i][sum].size()) nums[i][sum] = temp; } for(int j = 1; j <= (i * (i + 1)) / 2; j++) assert(nums[i][j].size()); } } int cnt = 0; int greaterValue(int N, int W) { cnt++; if(cnt == 1) prep(); int B[105], R[105]; for(int i = 0; i < N; i++) B[i] = 0; return 0; } void allValues(int N, int W, int *P) { if(W == 2*N){ } else{ } //return 0; } /* void process(){ } signed main(){ ios_base::sync_with_stdio(0); process(); }*/

컴파일 시 표준 에러 (stderr) 메시지

koala.cpp:19:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   19 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~
koala.cpp: In function 'int greaterValue(int, int)':
koala.cpp:68:9: warning: variable 'B' set but not used [-Wunused-but-set-variable]
   68 |     int B[105], R[105];
      |         ^
koala.cpp:68:17: warning: unused variable 'R' [-Wunused-variable]
   68 |     int B[105], R[105];
      |                 ^
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
   37 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...