Submission #72531

# Submission time Handle Problem Language Result Execution time Memory
72531 2018-08-26T08:50:28 Z IDxTree(#2155, TAMREF, imeimi2000, Diuven) Judge Against Wrong Code (FXCUP3_judge) C++17
10 / 100
193 ms 3488 KB
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_map>
#include <functional>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cstdlib>

using namespace std;
typedef long long llong;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<llong, llong> pll;

int x, d, c;
int dat[500000];
int cod[500000];
char in[50];
char ans[500001];
int main() {
    scanf("%d%d", &x, &d);
    for (int i = 0; i < d; ++i) {
        scanf("%s", in);
        for (int j = 0; j < x; ++j) {
            dat[i] <<= 1;
            if (in[j] == 'o') dat[i] ^= 1;
        }
    }
    scanf("%d", &c);
    for (int i = 0; i < c; ++i) {
        scanf("%s", in);
        for (int j = 0; j < x; ++j) {
            cod[i] <<= 1;
            if (in[j] == '.') cod[i] ^= 1;
        }
    }
    for (int i = 0; i <= c; ++i) ans[i] = 'x';
    for (int i = 0; i < (1 << d); ++i) {
        int x = 0;
        for (int j = 0; j < d; ++j) {
            if ((i >> j) & 1) x |= dat[j];
        }
        int cnt = 0;
        for (int j = 0; j < c; ++j) {
            if ((x & cod[j]) != x) ++cnt;
        }
        ans[cnt] = 'o';
    }
    printf("%s\n", ans + 1);
	return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:27:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &x, &d);
     ~~~~~^~~~~~~~~~~~~~~~
judge.cpp:29:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", in);
         ~~~~~^~~~~~~~~~
judge.cpp:35:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &c);
     ~~~~~^~~~~~~~~~
judge.cpp:37:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", in);
         ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 480 KB Output is correct
4 Correct 2 ms 516 KB Output is correct
5 Correct 5 ms 516 KB Output is correct
6 Correct 5 ms 516 KB Output is correct
7 Correct 5 ms 516 KB Output is correct
8 Correct 5 ms 516 KB Output is correct
9 Correct 5 ms 544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 480 KB Output is correct
4 Correct 2 ms 516 KB Output is correct
5 Correct 5 ms 516 KB Output is correct
6 Correct 5 ms 516 KB Output is correct
7 Correct 5 ms 516 KB Output is correct
8 Correct 5 ms 516 KB Output is correct
9 Correct 5 ms 544 KB Output is correct
10 Incorrect 193 ms 3488 KB Output isn't correct
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 480 KB Output is correct
4 Correct 2 ms 516 KB Output is correct
5 Correct 5 ms 516 KB Output is correct
6 Correct 5 ms 516 KB Output is correct
7 Correct 5 ms 516 KB Output is correct
8 Correct 5 ms 516 KB Output is correct
9 Correct 5 ms 544 KB Output is correct
10 Incorrect 193 ms 3488 KB Output isn't correct
11 Halted 0 ms 0 KB -