-
Notifications
You must be signed in to change notification settings - Fork 148
DionysiosB/CodeForces
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Sorry, we had to truncate this directory to 1,000 files. 5 entries were omitted from the list. | ||||
Repository files navigation
#include <cstdio> #include <vector> int main(){ long n; scanf("%ld", &n); std::vector<long> a(n); long sa(0); for(long p = 0; p < n; p++){scanf("%ld", &a[p]); sa += a[p];} std::vector<bool> v(101, 0); long tsf(0); for(long p = 0; p < n; p++){ for(long x = 0; x <= a[p]; x++){ long fp = 100 * x / a[p]; long tp = 100 * (tsf + x) / sa; if(fp == tp){v[fp] = 1;} } tsf += a[p]; } for(long p = 0; p < v.size(); p++){if(v[p]){printf("%ld\n", p);}} return 0; }
About
CodeForces Algorithms
Topics
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published