Submission #946877

# Submission time Handle Problem Language Result Execution time Memory
946877 2024-03-15T07:06:56 Z pragmatist Amusement Park (JOI17_amusement_park) C++17
10 / 100
13 ms 2148 KB
#include "Joi.h"
#include<bits/stdc++.h>

using namespace std;

void Joi(int _N, int _M, int _A[], int _B[], long long _X, int _T) {
  	int n = _N;
  	int m = _M;
  	long long x = _X;
  	for(int i = 0; i < n; ++i) {
  		int j = i%60;
  		MessageBoard(i, (x >> j & 1));
	}
}
#include "Ioi.h"
#include<bits/stdc++.h>

using namespace std;

int n, m, start;
int a[10005];

long long Ioi(int _N, int _M, int _A[], int _B[], int _P, int _V, int _T) {
	n = _N;
	m = _M;
	start = _P;
	a[start] = _V;
	int num = start/60;
	int L = num*60, R = min(n, (num+1)*60)-1;
	if(R-L+1<60) {
		assert(num>0);
		int go = (num-1)*60;
		while(start>go) {
			start--;
			a[start] = Move(start);
		}
		L = (num-1)*60;
		R = num*60-1;
	}
	while(start<R) {
		start++;
		a[start] = Move(start);
	}
	while(start>L) {
		start--;
		a[start] = Move(start);
	}
	long long ans = 0;
	for(int i = L; i <= R; ++i) {
		if(a[i]) {
			ans |= (1ll << (i-L));
		}
	}
	return ans;
}

Compilation message

Joi.cpp: In function 'void Joi(int, int, int*, int*, long long int, int)':
Joi.cpp:8:8: warning: unused variable 'm' [-Wunused-variable]
    8 |    int m = _M;
      |        ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 792 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 2148 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 784 KB Output is correct
2 Correct 1 ms 788 KB Output is correct
3 Correct 0 ms 796 KB Output is correct
4 Correct 2 ms 956 KB Output is correct
5 Correct 2 ms 816 KB Output is correct
6 Correct 2 ms 816 KB Output is correct
7 Correct 2 ms 824 KB Output is correct
8 Correct 2 ms 812 KB Output is correct
9 Correct 8 ms 1504 KB Output is correct
10 Correct 7 ms 1476 KB Output is correct
11 Correct 5 ms 1496 KB Output is correct
12 Correct 1 ms 800 KB Output is correct
13 Correct 1 ms 780 KB Output is correct
14 Correct 0 ms 796 KB Output is correct
15 Correct 0 ms 796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 2144 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 2148 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -