답안 #36017

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
36017 2017-12-04T08:37:32 Z ngkan146 Bulldozer (JOI17_bulldozer) C++
0 / 100
17 ms 512 KB
#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
struct point{
	double x,y;
	int w;
	point(double x=0,double y=0,double w=0): x(x), y(y), w(w) {}
};
int n;
point a[2005];
void rotate(point &P,double alpha){
	double tx = P.x * cos(alpha) - P.y * sin(alpha);
	double ty = P.x * sin(alpha) + P.y * cos(alpha);
	P.x = tx;
	P.y = ty;
}
bool cmp(point p,point q){
	return p.x < q.x;
}
int main(){
	iostream::sync_with_stdio(0);
	cin >> n;
	for(int i=1;i<=n;i++)
		cin >> a[i].x >> a[i].y >> a[i].w;
	
	long long ans = 0;
	int _Time = 3000;
	for(int i=0;i<=_Time;i++){
		sort(a+1,a+n+1,cmp);
		long long mi = 0, sum = 0;
		for(int j=1;j<=n;j++){
			sum += a[j].w;
			ans = max(ans, sum - mi);
			mi = min(mi, sum);
		}
		for(int j=1;j<=n;j++){
			rotate(a[j], pi / (1.0*_Time));
		}
	}
	cout << ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 16 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 436 KB Output is correct
2 Correct 17 ms 420 KB Output is correct
3 Correct 16 ms 384 KB Output is correct
4 Correct 16 ms 512 KB Output is correct
5 Correct 16 ms 384 KB Output is correct
6 Correct 16 ms 384 KB Output is correct
7 Correct 16 ms 384 KB Output is correct
8 Correct 16 ms 384 KB Output is correct
9 Correct 16 ms 384 KB Output is correct
10 Correct 16 ms 432 KB Output is correct
11 Correct 2 ms 384 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 384 KB Output is correct
14 Correct 2 ms 384 KB Output is correct
15 Correct 2 ms 384 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 2 ms 384 KB Output is correct
18 Correct 2 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 3 ms 384 KB Output is correct
21 Incorrect 16 ms 384 KB Output isn't correct
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 436 KB Output is correct
2 Correct 17 ms 420 KB Output is correct
3 Correct 16 ms 384 KB Output is correct
4 Correct 16 ms 512 KB Output is correct
5 Correct 16 ms 384 KB Output is correct
6 Correct 16 ms 384 KB Output is correct
7 Correct 16 ms 384 KB Output is correct
8 Correct 16 ms 384 KB Output is correct
9 Correct 16 ms 384 KB Output is correct
10 Correct 16 ms 432 KB Output is correct
11 Correct 2 ms 384 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 384 KB Output is correct
14 Correct 2 ms 384 KB Output is correct
15 Correct 2 ms 384 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 2 ms 384 KB Output is correct
18 Correct 2 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 3 ms 384 KB Output is correct
21 Incorrect 16 ms 384 KB Output isn't correct
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 436 KB Output is correct
2 Correct 17 ms 420 KB Output is correct
3 Correct 16 ms 384 KB Output is correct
4 Correct 16 ms 512 KB Output is correct
5 Correct 16 ms 384 KB Output is correct
6 Correct 16 ms 384 KB Output is correct
7 Correct 16 ms 384 KB Output is correct
8 Correct 16 ms 384 KB Output is correct
9 Correct 16 ms 384 KB Output is correct
10 Correct 16 ms 432 KB Output is correct
11 Correct 2 ms 384 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 384 KB Output is correct
14 Correct 2 ms 384 KB Output is correct
15 Correct 2 ms 384 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 2 ms 384 KB Output is correct
18 Correct 2 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 3 ms 384 KB Output is correct
21 Incorrect 16 ms 384 KB Output isn't correct
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 16 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -