답안 #14147

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14147 2015-05-02T08:43:23 Z minchurl Be Two Bees (OJUZ10_b2b) C++
11 / 100
1000 ms 1864 KB
#include<stdio.h>
#define oo 0x7fffffff
int h[100005],n,dapx,dapy,t[100005];
double dap;
FILE *in;
int main(){
    int i,j,sum=0;
    double x,y;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&h[i]);
        sum+=h[i];
    }
    dap=oo;
    for(i=0;i<n;i++)    scanf("%d",&t[i]);
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            x=sum-h[i]-h[j];
            y=1/((double)t[i])+1/((double)t[j]);
            x=x/y;
            if(x<dap){
                dap=x;
                dapx=i+1;
                dapy=j+1;
            }
        }
    }
    printf("%d %d\n",dapx,dapy);
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1864 KB Output is correct
2 Correct 0 ms 1864 KB Output is correct
3 Correct 0 ms 1864 KB Output is correct
4 Correct 0 ms 1864 KB Output is correct
5 Correct 0 ms 1864 KB Output is correct
6 Correct 0 ms 1864 KB Output is correct
7 Correct 0 ms 1864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 1864 KB Output is correct
2 Incorrect 10 ms 1864 KB Output isn't correct
3 Incorrect 1 ms 1864 KB Output isn't correct
4 Incorrect 3 ms 1864 KB Output isn't correct
5 Correct 11 ms 1864 KB Output is correct
6 Correct 0 ms 1864 KB Output is correct
7 Incorrect 10 ms 1864 KB Output isn't correct
8 Incorrect 10 ms 1864 KB Output isn't correct
9 Correct 11 ms 1864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1000 ms 1860 KB Program timed out
2 Execution timed out 1000 ms 1860 KB Program timed out
3 Execution timed out 1000 ms 1860 KB Program timed out
4 Execution timed out 1000 ms 1860 KB Program timed out
5 Execution timed out 1000 ms 1860 KB Program timed out
6 Execution timed out 1000 ms 1860 KB Program timed out
7 Execution timed out 1000 ms 1860 KB Program timed out
8 Execution timed out 1000 ms 1860 KB Program timed out
9 Execution timed out 1000 ms 1860 KB Program timed out
10 Execution timed out 1000 ms 1860 KB Program timed out
11 Execution timed out 1000 ms 1860 KB Program timed out
12 Execution timed out 1000 ms 1860 KB Program timed out
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1000 ms 1860 KB Program timed out
2 Execution timed out 1000 ms 1860 KB Program timed out
3 Execution timed out 1000 ms 1860 KB Program timed out
4 Execution timed out 1000 ms 1860 KB Program timed out
5 Execution timed out 1000 ms 1860 KB Program timed out
6 Execution timed out 1000 ms 1860 KB Program timed out
7 Execution timed out 1000 ms 1860 KB Program timed out
8 Execution timed out 1000 ms 1860 KB Program timed out
9 Execution timed out 1000 ms 1860 KB Program timed out
10 Execution timed out 1000 ms 1860 KB Program timed out
11 Execution timed out 1000 ms 1860 KB Program timed out
12 Execution timed out 1000 ms 1860 KB Program timed out
13 Execution timed out 1000 ms 1860 KB Program timed out
14 Execution timed out 1000 ms 1860 KB Program timed out
15 Execution timed out 1000 ms 1860 KB Program timed out
16 Execution timed out 1000 ms 1860 KB Program timed out
17 Execution timed out 1000 ms 1860 KB Program timed out