mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-07 00:19:36 +02:00
move legacy code to separate branch
This commit is contained in:
parent
68a30c8ee6
commit
11b4c48c3a
3528 changed files with 14477 additions and 53258 deletions
14
Data/Questions/ingsw/0210_3/wrong2.txt
Normal file
14
Data/Questions/ingsw/0210_3/wrong2.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
#define n 1000
|
||||
int TestOracle2(int *A, int *B)
|
||||
{
|
||||
int i, j, D[n];
|
||||
//init
|
||||
for (i = 0; i < n; i++) D[i] = -1;
|
||||
// B is ordered
|
||||
for (i = 0; i < n; i++) { for (j = i+1; j < n; j++) {if (B[j] < B[i]) {retun (0);}}}
|
||||
// B is a permutation of A
|
||||
for (i = 0; i < n; i++) { for (j = 0; j < n; j++) {if ((A[i] == B[j]) && (D[j] == -1)) {C[i][j] = 1; break;}
|
||||
for (i = 0; i < n; i++) {if (D[i] == -1) return (0);}
|
||||
// B ok
|
||||
return (1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue