답안 #1018380

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1018380 2024-07-09T21:42:47 Z MohamedFaresNebili 마술쇼 (APIO24_show) C++17
35 / 100
2 ms 1068 KB
#include <bits/stdc++.h>
#include "Alice.h"

		using namespace std;

		vector<pair<int, int>> Alice() {
			long long X = setN(5000);
			vector<pair<int, int>> G;
			for(int l = 1; l < 5000; l++) 
				G.push_back({X % l + 1, l + 1});
			return G;
		}
#include <bits/stdc++.h>
#include "Bob.h"

		using namespace std;

		long long Bob(vector<pair<int, int>> V) {
			long long res = 0;
			long long cur = 1;
			for(int l = 0; l < V.size(); l++)
				V[l].first--, V[l].second--;
			int i = 0;
			for(; res <= 1e18; res += cur) {
				while(i < V.size()) {
					if(res % V[i].second == V[i].first) {
						cur = cur * V[i].second / __gcd(cur, (long long)V[i].second);
						i++;
					} else break;
				}
				if(i == V.size()) break;
			}
			return res;
		}

Compilation message

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:9:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |    for(int l = 0; l < V.size(); l++)
      |                   ~~^~~~~~~~~~
Bob.cpp:13:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     while(i < V.size()) {
      |           ~~^~~~~~~~~~
Bob.cpp:19:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     if(i == V.size()) break;
      |        ~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 816 KB Correct.
2 Correct 1 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 1068 KB Correct.
6 Correct 2 ms 824 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 828 KB Correct.
10 Correct 1 ms 824 KB Correct.
11 Correct 2 ms 824 KB Correct.
12 Correct 2 ms 824 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 816 KB Correct.
2 Correct 1 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 1068 KB Correct.
6 Correct 2 ms 824 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 828 KB Correct.
10 Correct 1 ms 824 KB Correct.
11 Correct 2 ms 824 KB Correct.
12 Correct 2 ms 824 KB Correct.
13 Correct 2 ms 820 KB Correct.
14 Correct 2 ms 820 KB Correct.
15 Correct 2 ms 820 KB Correct.
16 Correct 2 ms 820 KB Correct.
17 Correct 2 ms 832 KB Correct.
18 Correct 2 ms 820 KB Correct.
19 Correct 2 ms 820 KB Correct.
20 Correct 2 ms 820 KB Correct.
21 Correct 1 ms 820 KB Correct.
22 Correct 1 ms 820 KB Correct.
23 Correct 1 ms 820 KB Correct.
24 Correct 2 ms 832 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 816 KB Correct.
2 Correct 1 ms 820 KB Correct.
3 Correct 1 ms 820 KB Correct.
4 Correct 2 ms 824 KB Correct.
5 Correct 2 ms 1068 KB Correct.
6 Correct 2 ms 824 KB Correct.
7 Correct 2 ms 832 KB Correct.
8 Correct 1 ms 820 KB Correct.
9 Correct 2 ms 828 KB Correct.
10 Correct 1 ms 824 KB Correct.
11 Correct 2 ms 824 KB Correct.
12 Correct 2 ms 824 KB Correct.
13 Correct 2 ms 820 KB Correct.
14 Correct 2 ms 820 KB Correct.
15 Correct 2 ms 820 KB Correct.
16 Correct 2 ms 820 KB Correct.
17 Correct 2 ms 832 KB Correct.
18 Correct 2 ms 820 KB Correct.
19 Correct 2 ms 820 KB Correct.
20 Correct 2 ms 820 KB Correct.
21 Correct 1 ms 820 KB Correct.
22 Correct 1 ms 820 KB Correct.
23 Correct 1 ms 820 KB Correct.
24 Correct 2 ms 832 KB Correct.
25 Correct 2 ms 828 KB Correct.
26 Incorrect 1 ms 820 KB Incorrect answer.
27 Halted 0 ms 0 KB -