제출 #600204

#제출 시각아이디문제언어결과실행 시간메모리
600204FidanDetecting Molecules (IOI16_molecules)C++17
19 / 100
1 ms340 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; typedef int ll; vector<int> find_subset(int l, int u, vector<int> w) { ll n=w.size(), i, j, c1=-1, c2=-1; vector<ll> v(n+1, 0); vector<ll> cvb; for(i=1; i<=n; i++){ v[i]=v[i-1]+w[i-1]; } for(i=0; i<n; i++){ for(j=i+1; j<=n; j++){ if(v[j]-v[i]>=l && v[j]-v[i]<=u){ c1=i+1, c2=j; } } } if(c1==-1) return cvb; else{ for(i=c1; i<=c2; i++){ cvb.push_back(i-1); } return cvb; } }
#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...