답안 #1041753

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1041753 2024-08-02T07:46:44 Z 김은성(#11000) A Light Inconvenience (CEOI23_light) C++17
5 / 100
627 ms 1048576 KB
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool ch;
ll cnt;
void prepare(){
	ch = 0;
	cnt = 1;
}

std::pair<long long, std::vector<long long>> join(long long p){
	cnt += p;
	vector<ll> ret;
	for(ll i=cnt; i>=1; i-=5)
		ret.push_back(i);
	if(ret.back() != 1)
		ret.push_back(1);
	for(int i=0; i<ret.size()/2; i++)
		swap(ret[i], ret[ret.size()-1-i]);
	return make_pair(5*p, ret);
}

std::pair<long long, std::vector<long long>> leave(long long p){
	ch = 1;
	cnt -= p;
	vector<ll> ret;
	for(ll i=cnt; i>=1; i-=5)
		ret.push_back(i);
	if(ret.back() != 1)
		ret.push_back(1);
	for(int i=0; i<ret.size()/2; i++)
		swap(ret[i], ret[ret.size()-1-i]);
	return make_pair(5*p, ret);
}

Compilation message

light.cpp: In function 'std::pair<long long int, std::vector<long long int> > join(long long int)':
light.cpp:19:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |  for(int i=0; i<ret.size()/2; i++)
      |               ~^~~~~~~~~~~~~
light.cpp: In function 'std::pair<long long int, std::vector<long long int> > leave(long long int)':
light.cpp:32:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |  for(int i=0; i<ret.size()/2; i++)
      |               ~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Runtime error 604 ms 1048576 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 262 ms 344 KB Output is correct
3 Correct 35 ms 716 KB Output is correct
4 Correct 270 ms 592 KB Output is correct
5 Correct 255 ms 344 KB Output is correct
6 Correct 5 ms 600 KB Output is correct
7 Correct 249 ms 600 KB Output is correct
8 Correct 15 ms 344 KB Output is correct
9 Correct 225 ms 456 KB Output is correct
10 Correct 269 ms 720 KB Output is correct
11 Correct 83 ms 344 KB Output is correct
12 Correct 258 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 262 ms 344 KB Output is correct
3 Correct 35 ms 716 KB Output is correct
4 Correct 270 ms 592 KB Output is correct
5 Correct 255 ms 344 KB Output is correct
6 Correct 5 ms 600 KB Output is correct
7 Correct 249 ms 600 KB Output is correct
8 Correct 15 ms 344 KB Output is correct
9 Correct 225 ms 456 KB Output is correct
10 Correct 269 ms 720 KB Output is correct
11 Correct 83 ms 344 KB Output is correct
12 Correct 258 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 285 ms 440 KB Output is correct
15 Correct 36 ms 344 KB Output is correct
16 Correct 251 ms 468 KB Output is correct
17 Correct 267 ms 504 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
19 Correct 307 ms 472 KB Output is correct
20 Correct 22 ms 600 KB Output is correct
21 Correct 217 ms 600 KB Output is correct
22 Correct 275 ms 504 KB Output is correct
23 Correct 82 ms 344 KB Output is correct
24 Correct 233 ms 344 KB Output is correct
25 Incorrect 0 ms 344 KB Not correct
26 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 262 ms 344 KB Output is correct
3 Correct 35 ms 716 KB Output is correct
4 Correct 270 ms 592 KB Output is correct
5 Correct 255 ms 344 KB Output is correct
6 Correct 5 ms 600 KB Output is correct
7 Correct 249 ms 600 KB Output is correct
8 Correct 15 ms 344 KB Output is correct
9 Correct 225 ms 456 KB Output is correct
10 Correct 269 ms 720 KB Output is correct
11 Correct 83 ms 344 KB Output is correct
12 Correct 258 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 285 ms 440 KB Output is correct
15 Correct 36 ms 344 KB Output is correct
16 Correct 251 ms 468 KB Output is correct
17 Correct 267 ms 504 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
19 Correct 307 ms 472 KB Output is correct
20 Correct 22 ms 600 KB Output is correct
21 Correct 217 ms 600 KB Output is correct
22 Correct 275 ms 504 KB Output is correct
23 Correct 82 ms 344 KB Output is correct
24 Correct 233 ms 344 KB Output is correct
25 Incorrect 0 ms 344 KB Not correct
26 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 262 ms 344 KB Output is correct
3 Correct 35 ms 716 KB Output is correct
4 Correct 270 ms 592 KB Output is correct
5 Correct 255 ms 344 KB Output is correct
6 Correct 5 ms 600 KB Output is correct
7 Correct 249 ms 600 KB Output is correct
8 Correct 15 ms 344 KB Output is correct
9 Correct 225 ms 456 KB Output is correct
10 Correct 269 ms 720 KB Output is correct
11 Correct 83 ms 344 KB Output is correct
12 Correct 258 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 285 ms 440 KB Output is correct
15 Correct 36 ms 344 KB Output is correct
16 Correct 251 ms 468 KB Output is correct
17 Correct 267 ms 504 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
19 Correct 307 ms 472 KB Output is correct
20 Correct 22 ms 600 KB Output is correct
21 Correct 217 ms 600 KB Output is correct
22 Correct 275 ms 504 KB Output is correct
23 Correct 82 ms 344 KB Output is correct
24 Correct 233 ms 344 KB Output is correct
25 Incorrect 0 ms 344 KB Not correct
26 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 262 ms 344 KB Output is correct
3 Correct 35 ms 716 KB Output is correct
4 Correct 270 ms 592 KB Output is correct
5 Correct 255 ms 344 KB Output is correct
6 Correct 5 ms 600 KB Output is correct
7 Correct 249 ms 600 KB Output is correct
8 Correct 15 ms 344 KB Output is correct
9 Correct 225 ms 456 KB Output is correct
10 Correct 269 ms 720 KB Output is correct
11 Correct 83 ms 344 KB Output is correct
12 Correct 258 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 285 ms 440 KB Output is correct
15 Correct 36 ms 344 KB Output is correct
16 Correct 251 ms 468 KB Output is correct
17 Correct 267 ms 504 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
19 Correct 307 ms 472 KB Output is correct
20 Correct 22 ms 600 KB Output is correct
21 Correct 217 ms 600 KB Output is correct
22 Correct 275 ms 504 KB Output is correct
23 Correct 82 ms 344 KB Output is correct
24 Correct 233 ms 344 KB Output is correct
25 Incorrect 0 ms 344 KB Not correct
26 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 0 ms 340 KB Partially correct
2 Runtime error 627 ms 1048576 KB Execution killed with signal 9
3 Halted 0 ms 0 KB -