제출 #942271

#제출 시각아이디문제언어결과실행 시간메모리
942271Nika533Detecting Molecules (IOI16_molecules)C++14
31 / 100
11 ms856 KiB
#pragma GCC diagnostic warning "-std=c++11" #include <bits/stdc++.h> #include "molecules.h" #define pb push_back #define f first #define s second #define MOD 1000000007 #define flush fflush(stdout) #define all(x) (x).begin(),(x).end() #define allr(x) (x).rbegin(), (x).rend() #define pii pair<int,int> using namespace std; int n,T,k; int last[1005]; bool dp[1005]; vector<int> freq[10005]; vector<int> find_subset(int l, int u, vector<int> W) { n=W.size(); vector<int> w; w.pb(0); for (auto x:W) w.pb(x); for (int i=1; i<=n; i++) { for (int j=1000; j>=w[i]+1; j--) { if (last[j-w[i]] && dp[j]==0) { dp[j]=1; last[j]=w[i]; } } if (dp[w[i]]==0) { dp[w[i]]=1; last[w[i]]=w[i]; } } for (int i=1; i<=n; i++) freq[w[i]].clear(); for (int i=1; i<=n; i++) freq[w[i]].pb(i-1); vector<int> v; for (int sum=l; sum<=u; sum++) { if (dp[sum]) { vector<int> ind(10005,0); int val=sum; while (val) { v.pb(freq[last[val]][ind[last[val]]]); ind[last[val]]++; val-=last[val]; } return v; } } return v; }

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

molecules.cpp:1:32: warning: '-std=c++11' is not an option that controls warnings [-Wpragmas]
    1 | #pragma GCC diagnostic warning "-std=c++11"
      |                                ^~~~~~~~~~~~
#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...