Submission #14100

#TimeUsernameProblemLanguageResultExecution timeMemory
14100cometBe Two Bees (OJUZ10_b2b)C++98
0 / 100
47 ms4208 KiB
#include<cstdio> #include<algorithm> typedef std::pair<double,int> pp; #define ll long long ll p,h[100010],t[100010]; pp s[100010]; int n; int main(){ scanf("%d",&n); for(int i=0;i<n;i++)scanf("%lld",&h[i]),p+=h[i]; for(int i=0;i<n;i++)scanf("%lld",&t[i]); for(int i=0;i<n;i++)s[i]=pp((double)(p-h[i])/(double)t[i],i); sort(s,s+n); printf("%d %d\n",s[0].second,s[1].second); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...