Submission #12051

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
120512014-12-20 00:12:55tncks0121배낭 문제 준비하기 (GA9_invknapsack)C++14
5 / 100
36 ms2848 KiB
#include <iostream>
#include <cstdio>
using namespace std;
//int good[100005][305];
int chk[100005], cur[100005];
int p = 1;
int res[100005], rn;
// table[i][j] : j i ?
void solve (int t) {
if(cur[t] < 0) {
solve(-cur[t]);
solve(t + cur[t]);
}else {
for(int i = 0; i < chk[t]; i++) {
res[++rn] = (i < cur[t]) ? p : 293-p;
}
++p;
}
}
int main() {
for(int i = 1; i <= 100000; i++) chk[i] = (int)1e9;
for(int a = 1; a <= 300; a++) {
for(int b = 1; b <= 300-a; b++) {
// good[a*b][a+b] = a;
if(chk[a*b] > a+b) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...