#include <stdio.h>
int main() {
int correct_digit, correct_place;
int possible_codes[10] = {0}; // Initialize all possible codes to 0
// Clue from 983: one digit is correct and in its right place
possible_codes[9] = 2; // 9 is in the right place
possible_codes[8] = 1; // 8 is incorrect
possible_codes[3] = 1; // 3 is incorrect
// Clue from 914: one digit is correct but in the wrong place
possible_codes[1] = 1; // 1 is incorrect
// Since 4 is not marked as incorrect from the first clue and not in the correct place from second clue,
// it must be correct but not at position 3 (0 based index)
possible_codes[4] = 2; // 4 is in the wrong place, but correct
// Clue from 309: two digits are correct but in the wrong places
possible_codes[0] = 2; // 0 is correct but in the wrong place
// Clue from 728: all digits are incorrect
possible_codes[7] = 1; // 7 is incorrect
possible_codes[2] = 1; // 2 is incorrect
// Clue from 780: one digit is correct but in the wrong place
// We have already marked 0 as correct from previous clue.
// Let's determine the correct code now
int code[3] = {-1, -1, -1}; // Initialize code with -1
// If a digit is marked with 2, it's in the correct code but we don't know the position yet
for (int i = 0; i < 10; i++) {
if (possible_codes[i] == 2) {
// Find the correct position for digit i
for (int pos = 0; pos < 3; pos++) {
// 4 cannot be in the third position (2 in 0 based index), 0 cannot be in the first position (0 in 0 based index)
if ((i == 4 && pos != 2) || (i == 0 && pos != 0) || (i == 9 && pos == 0)) {
code[pos] = i;
break;
}
}
}
}
// Print the correct code
for (int i = 0; i < 3; i++) {
}
return 0;
}