# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
321310 | 2020-11-12 04:57:43 | seedkin | Get Hundred Points! (FXCUP4_hundred) | C++17 | 0 / 100 | 8 ms | 10476 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "hundred.h"
#include <stdio.h>
#define aBit 1
#define bBit 2
#define cBit 4
#define aIdx 0
#define bIdx 1
#define cIdx 2
int dir[100][260][100]; // dir[idx][char'A'] = idx * 10 + char bit
std::string GetHundredPoints(int A, int B, int C) {
// int a, b, c;
// a = b = c = 0;
int isCorret[100];
int candi[100];
// char ans[100];
int bit[500];
bit['A'] = aBit;
bit['B'] = bBit;
bit['C'] = cBit;
// char c[5];
// c[aBit] = 'A';
// c[bBit] = 'B';
// c[cBit] = 'C';
std::string str = std::string(A, 'A') + std::string(B, 'B') + std::string(C, 'C');
for(int i =0; i < 100 ; i++) {
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
hundred.cpp: In function 'std::string GetHundredPoints(int, int, int)': hundred.cpp:52:29: warning: array subscript has type 'char' [-Wchar-subscripts] 52 | if((candi[i] & bit[str[j]]) == 0) continue; | ^ hundred.cpp:53:29: warning: array subscript has type 'char' [-Wchar-subscripts] 53 | if((candi[j] & bit[str[i]]) == 0) continue; | ^ hundred.cpp:72:28: warning: array subscript has type 'char' [-Wchar-subscripts] 72 | candi[i] &= ~bit[str[j]]; | ^ hundred.cpp:73:28: warning: array subscript has type 'char' [-Wchar-subscripts] 73 | candi[j] &= ~bit[str[i]]; | ^ hundred.cpp:74:22: warning: array subscript has type 'char' [-Wchar-subscripts] 74 | dir[i][bit[str[i]]][j] = candi[i] & (~bit[str[i]]); | ^ hundred.cpp:74:53: warning: array subscript has type 'char' [-Wchar-subscripts] 74 | dir[i][bit[str[i]]][j] = candi[i] & (~bit[str[i]]); | ^ hundred.cpp:75:36: warning: array subscript has type 'char' [-Wchar-subscripts] 75 | dir[i][(candi[i] & (~bit[str[i]]))][j] = bit[str[j]]; | ^ hundred.cpp:75:56: warning: array subscript has type 'char' [-Wchar-subscripts] 75 | dir[i][(candi[i] & (~bit[str[i]]))][j] = bit[str[j]]; | ^ hundred.cpp:79:26: warning: array subscript has type 'char' [-Wchar-subscripts] 79 | candi[i] = bit[str[i]]; | ^ hundred.cpp:80:26: warning: array subscript has type 'char' [-Wchar-subscripts] 80 | candi[j] = bit[str[j]]; | ^ hundred.cpp:85:26: warning: array subscript has type 'char' [-Wchar-subscripts] 85 | if(dir[i][bit[str[i]]][k] == -1) continue; | ^ hundred.cpp:86:34: warning: array subscript has type 'char' [-Wchar-subscripts] 86 | candi[k] = dir[i][bit[str[i]]][k]; | ^ hundred.cpp:93:28: warning: array subscript has type 'char' [-Wchar-subscripts] 93 | candi[i] &= ~bit[str[j]]; | ^ hundred.cpp:94:28: warning: array subscript has type 'char' [-Wchar-subscripts] 94 | candi[j] &= ~bit[str[i]]; | ^ hundred.cpp:95:22: warning: array subscript has type 'char' [-Wchar-subscripts] 95 | dir[i][bit[str[i]]][j] = candi[i] & (~bit[str[i]]); | ^ hundred.cpp:95:53: warning: array subscript has type 'char' [-Wchar-subscripts] 95 | dir[i][bit[str[i]]][j] = candi[i] & (~bit[str[i]]); | ^ hundred.cpp:96:36: warning: array subscript has type 'char' [-Wchar-subscripts] 96 | dir[i][(candi[i] & (~bit[str[i]]))][j] = bit[str[j]]; | ^ hundred.cpp:96:56: warning: array subscript has type 'char' [-Wchar-subscripts] 96 | dir[i][(candi[i] & (~bit[str[i]]))][j] = bit[str[j]]; | ^ hundred.cpp:102:28: warning: array subscript has type 'char' [-Wchar-subscripts] 102 | candi[i] &= ~bit[str[i]]; | ^ hundred.cpp:103:28: warning: array subscript has type 'char' [-Wchar-subscripts] 103 | candi[j] &= ~bit[str[j]]; | ^ hundred.cpp:108:26: warning: array subscript has type 'char' [-Wchar-subscripts] 108 | if(dir[i][bit[str[i]]][k] == -1) continue; | ^ hundred.cpp:109:34: warning: array subscript has type 'char' [-Wchar-subscripts] 109 | candi[k] = dir[i][bit[str[i]]][k]; | ^ hundred.cpp:120:29: warning: array subscript has type 'char' [-Wchar-subscripts] 120 | if((candi[i] & bit[str[j]]) == 0) continue; | ^ hundred.cpp:121:29: warning: array subscript has type 'char' [-Wchar-subscripts] 121 | if((candi[j] & bit[str[i]]) == 0) continue; | ^ hundred.cpp:132:26: warning: array subscript has type 'char' [-Wchar-subscripts] 132 | candi[i] = bit[str[i]]; | ^ hundred.cpp:133:26: warning: array subscript has type 'char' [-Wchar-subscripts] 133 | candi[j] = bit[str[j]]; | ^ hundred.cpp:138:26: warning: array subscript has type 'char' [-Wchar-subscripts] 138 | candi[i] = bit[str[i]]; | ^ hundred.cpp:139:28: warning: array subscript has type 'char' [-Wchar-subscripts] 139 | candi[j] &= ~bit[str[j]]; | ^ hundred.cpp:140:28: warning: array subscript has type 'char' [-Wchar-subscripts] 140 | candi[j] &= ~bit[str[i]]; | ^ hundred.cpp:144:26: warning: array subscript has type 'char' [-Wchar-subscripts] 144 | candi[i] = bit[str[i]]; | ^ hundred.cpp:145:26: warning: array subscript has type 'char' [-Wchar-subscripts] 145 | candi[j] = bit[str[i]]; | ^ hundred.cpp:153:25: warning: array subscript has type 'char' [-Wchar-subscripts] 153 | if(dir[i][bit[str[i]]][k] == -1) continue; | ^ hundred.cpp:154:33: warning: array subscript has type 'char' [-Wchar-subscripts] 154 | candi[k] = dir[i][bit[str[i]]][k]; | ^
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |