제출 #1162346

#제출 시각아이디문제언어결과실행 시간메모리
1162346tsengangDetecting Molecules (IOI16_molecules)C++20
0 / 100
0 ms328 KiB
#include <bits/stdc++.h> #include "molecules.h" using namespace std; #define ll long long #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define pb push_back #define ertunt return const int mod = 998244353; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") vector<int>find_subset(int l, int u, vector<int>w){ sort(all(w)); int n = w.size(); ll cur = 0; vector<int> ans; ll j = 0; while(j < n and cur + w[j] <= u){ cur+=w[j]; j++; } if(j == 0)ertunt ans; if(cur >= l){ vector<int>c(j); iota(all(c),0); ertunt c; } int lst = n-1; int i = 0; while(lst >= j){ if(cur >= l)break; cur+= w[lst] - w[i]; i++; lst++; ans.pb(lst+1); } if(cur >= l){ for(; i < j; i++)ans.pb(i); ertunt ans; } else{ vector<int>c; ertunt c; } }

컴파일 시 표준 에러 (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...