답안 #1120238

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1120238 2024-11-28T06:41:22 Z vjudge1 Palindrome-Free Numbers (BOI13_numbers) C++11
3.75 / 100
1000 ms 508 KB
#include <bits/stdc++.h>
#define GOOD_LUCK ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define int long long
#define itn int
#define Int int
#define INF -1000000
#define MOD 1000000007
#define endl "\n"
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
using namespace std;

int temp;

bool check(int n) {
	string a = to_string(n);
	string c = a;
	int x = a.size();
	string b = a;
	reverse(b.begin(), b.end());
	string d = b;
	if (a == b) return false;
	for (int i=1; i < x-1; i++) {
		a = a.substr(1);
		b = b.substr(0, x - i);
		if (a == b) return false;
	}
	a = c;
	b = d;
	for (int i=1; i < x-1; i++) {
		d = d.substr(1);
		c = c.substr(0, x - i);
		if (c == d) return false;
	}
	return true;
}

signed main() {
	
	GOOD_LUCK
	
    int t;
	t = 1;
//	cin >> t;
    while (t--) {
    	int a, b;
    	cin >> a >> b;
    	int cnt=0;
    	for (int i=a; i <= b; i++) {
    		if (check(i)) cnt++;
		}
		cout << cnt;
	}

    return 0;
}
// Problem C
// by Ekber_Ekber
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Incorrect 80 ms 336 KB Output isn't correct
4 Incorrect 16 ms 336 KB Output isn't correct
5 Incorrect 1 ms 336 KB Output isn't correct
6 Incorrect 1 ms 336 KB Output isn't correct
7 Incorrect 1 ms 336 KB Output isn't correct
8 Incorrect 1 ms 336 KB Output isn't correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 380 KB Output is correct
11 Incorrect 1 ms 336 KB Output isn't correct
12 Incorrect 1 ms 336 KB Output isn't correct
13 Correct 1 ms 504 KB Output is correct
14 Incorrect 16 ms 460 KB Output isn't correct
15 Incorrect 17 ms 336 KB Output isn't correct
16 Incorrect 2 ms 504 KB Output isn't correct
17 Incorrect 12 ms 460 KB Output isn't correct
18 Incorrect 1 ms 336 KB Output isn't correct
19 Incorrect 89 ms 436 KB Output isn't correct
20 Incorrect 25 ms 336 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1064 ms 336 KB Time limit exceeded
2 Execution timed out 1031 ms 336 KB Time limit exceeded
3 Execution timed out 1082 ms 336 KB Time limit exceeded
4 Execution timed out 1079 ms 336 KB Time limit exceeded
5 Execution timed out 1083 ms 336 KB Time limit exceeded
6 Execution timed out 1016 ms 336 KB Time limit exceeded
7 Execution timed out 1024 ms 436 KB Time limit exceeded
8 Incorrect 694 ms 440 KB Output isn't correct
9 Execution timed out 1034 ms 336 KB Time limit exceeded
10 Execution timed out 1073 ms 508 KB Time limit exceeded
11 Execution timed out 1034 ms 336 KB Time limit exceeded
12 Execution timed out 1043 ms 336 KB Time limit exceeded
13 Execution timed out 1046 ms 336 KB Time limit exceeded
14 Execution timed out 1063 ms 504 KB Time limit exceeded
15 Execution timed out 1083 ms 336 KB Time limit exceeded
16 Execution timed out 1044 ms 336 KB Time limit exceeded
17 Execution timed out 1060 ms 336 KB Time limit exceeded
18 Execution timed out 1038 ms 336 KB Time limit exceeded
19 Execution timed out 1074 ms 336 KB Time limit exceeded
20 Execution timed out 1042 ms 336 KB Time limit exceeded
21 Execution timed out 1020 ms 336 KB Time limit exceeded
22 Execution timed out 1043 ms 336 KB Time limit exceeded
23 Execution timed out 1046 ms 336 KB Time limit exceeded
24 Execution timed out 1049 ms 336 KB Time limit exceeded
25 Execution timed out 1068 ms 336 KB Time limit exceeded
26 Execution timed out 1067 ms 336 KB Time limit exceeded
27 Execution timed out 1054 ms 336 KB Time limit exceeded
28 Execution timed out 1058 ms 336 KB Time limit exceeded
29 Execution timed out 1056 ms 336 KB Time limit exceeded
30 Execution timed out 1035 ms 336 KB Time limit exceeded
31 Execution timed out 1043 ms 336 KB Time limit exceeded
32 Execution timed out 1051 ms 336 KB Time limit exceeded
33 Execution timed out 1052 ms 336 KB Time limit exceeded
34 Execution timed out 1046 ms 336 KB Time limit exceeded
35 Execution timed out 1053 ms 336 KB Time limit exceeded
36 Execution timed out 1049 ms 336 KB Time limit exceeded
37 Execution timed out 1055 ms 336 KB Time limit exceeded
38 Execution timed out 1049 ms 336 KB Time limit exceeded
39 Execution timed out 1055 ms 336 KB Time limit exceeded
40 Execution timed out 1036 ms 336 KB Time limit exceeded
41 Execution timed out 1057 ms 336 KB Time limit exceeded
42 Execution timed out 1052 ms 336 KB Time limit exceeded
43 Execution timed out 1063 ms 336 KB Time limit exceeded
44 Execution timed out 1029 ms 336 KB Time limit exceeded
45 Execution timed out 1072 ms 336 KB Time limit exceeded