답안 #1018383

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

		using namespace std;

		vector<pair<int, int>> Alice() {
			long long X = setN(1000);
			vector<pair<int, int>> G;
			for(int l = 1; l < 1000; 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) {
                      	if(cur <= 1e18)
							cur = cur * (long long)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:20: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]
   20 |     if(i == V.size()) break;
      |        ~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 780 KB Correct.
2 Correct 1 ms 780 KB Correct.
3 Correct 2 ms 780 KB Correct.
4 Correct 0 ms 780 KB Correct.
5 Correct 0 ms 788 KB Correct.
6 Correct 0 ms 784 KB Correct.
7 Correct 0 ms 780 KB Correct.
8 Correct 1 ms 788 KB Correct.
9 Correct 0 ms 780 KB Correct.
10 Correct 1 ms 788 KB Correct.
11 Correct 0 ms 780 KB Correct.
12 Correct 0 ms 780 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 780 KB Correct.
2 Correct 1 ms 780 KB Correct.
3 Correct 2 ms 780 KB Correct.
4 Correct 0 ms 780 KB Correct.
5 Correct 0 ms 788 KB Correct.
6 Correct 0 ms 784 KB Correct.
7 Correct 0 ms 780 KB Correct.
8 Correct 1 ms 788 KB Correct.
9 Correct 0 ms 780 KB Correct.
10 Correct 1 ms 788 KB Correct.
11 Correct 0 ms 780 KB Correct.
12 Correct 0 ms 780 KB Correct.
13 Correct 0 ms 780 KB Correct.
14 Correct 0 ms 788 KB Correct.
15 Correct 1 ms 780 KB Correct.
16 Correct 0 ms 780 KB Correct.
17 Correct 0 ms 780 KB Correct.
18 Correct 0 ms 780 KB Correct.
19 Correct 0 ms 780 KB Correct.
20 Correct 1 ms 780 KB Correct.
21 Correct 1 ms 780 KB Correct.
22 Correct 0 ms 780 KB Correct.
23 Correct 0 ms 780 KB Correct.
24 Correct 0 ms 780 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 780 KB Correct.
2 Correct 1 ms 780 KB Correct.
3 Correct 2 ms 780 KB Correct.
4 Correct 0 ms 780 KB Correct.
5 Correct 0 ms 788 KB Correct.
6 Correct 0 ms 784 KB Correct.
7 Correct 0 ms 780 KB Correct.
8 Correct 1 ms 788 KB Correct.
9 Correct 0 ms 780 KB Correct.
10 Correct 1 ms 788 KB Correct.
11 Correct 0 ms 780 KB Correct.
12 Correct 0 ms 780 KB Correct.
13 Correct 0 ms 780 KB Correct.
14 Correct 0 ms 788 KB Correct.
15 Correct 1 ms 780 KB Correct.
16 Correct 0 ms 780 KB Correct.
17 Correct 0 ms 780 KB Correct.
18 Correct 0 ms 780 KB Correct.
19 Correct 0 ms 780 KB Correct.
20 Correct 1 ms 780 KB Correct.
21 Correct 1 ms 780 KB Correct.
22 Correct 0 ms 780 KB Correct.
23 Correct 0 ms 780 KB Correct.
24 Correct 0 ms 780 KB Correct.
25 Correct 0 ms 788 KB Correct.
26 Incorrect 0 ms 780 KB Incorrect answer.
27 Halted 0 ms 0 KB -