제출 #872498

#제출 시각아이디문제언어결과실행 시간메모리
872498ZeroDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> #define ll long long // #include "molecules.h" #define pb push_back using namespace std; vector<int> find_subset(int l, int u, vector<int> a){ ll n = a.size(); vector<int> v; ll s = 0; bool jj = true; for(ll i=0,j=0; i < n && j < n;){ if(s>=l && s <= u){ j--; if(i == j) v.pb(i); else v.pb(i),v.pb(j); break; } if(s < l) s += a[j],j++; else if(s>u) s-=a[i], i ++; } return v; }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:12:10: warning: unused variable 'jj' [-Wunused-variable]
   12 |     bool jj = true;
      |          ^~
#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...