제출 #1319217

#제출 시각아이디문제언어결과실행 시간메모리
1319217yessimkhanDetecting Molecules (IOI16_molecules)C++20
0 / 100
1 ms380 KiB
#include "molecules.h" #include <bits/stdc++.h> // solved by bekagg #define ll long long #define ent '\n' #define pb push_back #define all(x) x.begin(),x.end() #define PRaim_bek_abi ios_base::sync_with_stdio(0);cin.tie(0); using namespace std; const int N = 1e5+5; const int MOD = 1e9+7; int p[N]; vector<int> find_subset(int l, int u, vector<int> w){ p[0] = -1; for (int i = 0; i < w.size(); i++){ for (int j = u; j >= w[i]; j--){ if (p[j] != 0 or p[j - w[i]] == 0){ continue; } p[j] = i; } } for (int i = l; i <= u; i++){ if (p[i] != 0){ vector<int>ans; int x = i; while(x){ ans.pb(p[x]); x -= w[p[x]]; } return ans; } } return {0}; }

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

molecules.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
molecules_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...