1. 어느정도 난이도 인지 파악중
2. 오케이 DFS, Backtracking MH, H 정도
3. 클리어 오케이
#include <stdio.h>
int n;
double res;
int main() {
freopen("input.txt", "r", stdin);
int t, tv = 0;
int i, j, k;
scanf("%d", &t);
while (t--)
{
scanf("%d", &n);
res = 0;
for (i = 0; i < n; i++)
{
double p, q;
scanf("%lf %lf", &p, &q);
res += p * q;
}
printf("#%d %.9lf\n", ++tv, res);
}
}
'Algorithms > simulation' 카테고리의 다른 글
그래프의 삼각형 (0) | 2019.01.30 |
---|---|
추억의 2048 게임 (0) | 2019.01.30 |
희성이의 원근법 (0) | 2019.01.30 |
장애물 경주 난이도 (0) | 2019.01.30 |
천사의 계단 (0) | 2019.01.29 |
댓글