Submission #1416765


Source Code Expand

#include <iostream>
#include <vector>
#include <algorithm>

int main() {
    int h, w;
    std::cin >> h >> w;

    std::vector<int> hor(h);
    std::vector<int> ver(w);
    std::vector<std::vector<int>> cnt(h, std::vector<int>(w));

    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            int a;
            scanf("%d", &a);
            if (a == 0) {
                hor[i]++;
                ver[j]++;
                cnt[i][j]++;
            }
        }
    }

    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            if (j > 0) putchar(' ');
            printf("%d", (hor[i] + ver[j] + cnt[i][j]) % 2);
        }
        puts("");
    }
}

Submission Info

Submission Time
Task H - 植林
User pekempey
Language C++14 (GCC 5.4.1)
Score 100
Code Size 730 Byte
Status AC
Exec Time 162 ms
Memory 6144 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:16:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d", &a);
                            ^

Judge Result

Set Name Partial 1 All
Score / Max Score 3 / 3 97 / 97
Status
AC × 35
AC × 101
Set Name Test Cases
Partial 1 00_alt_01, 00_alt_03, 00_alt_06, 00_alt_08, 00_alt_21, 00_alt_23, 00_alt_26, 00_alt_28, 00_alt_41, 00_alt_43, 00_alt_46, 00_alt_48, 00_alt_61, 00_alt_63, 00_alt_66, 00_alt_68, 00_fill_00, 00_fill_02, 00_fill_05, 00_fill_07, 00_fill_10, 00_fill_12, 00_fill_20, 00_fill_22, 00_fill_25, 00_fill_27, 00_fill_40, 00_fill_42, 00_rand_04, 00_rand_09, 00_rand_14, 00_rand_24, 00_rand_29, 00_rand_44, 00_sample_1
All 00_alt_01, 00_alt_03, 00_alt_06, 00_alt_08, 00_alt_21, 00_alt_23, 00_alt_26, 00_alt_28, 00_alt_41, 00_alt_43, 00_alt_46, 00_alt_48, 00_alt_61, 00_alt_63, 00_alt_66, 00_alt_68, 00_fill_00, 00_fill_02, 00_fill_05, 00_fill_07, 00_fill_10, 00_fill_12, 00_fill_20, 00_fill_22, 00_fill_25, 00_fill_27, 00_fill_40, 00_fill_42, 00_rand_04, 00_rand_09, 00_rand_14, 00_rand_24, 00_rand_29, 00_rand_44, 00_sample_1, 10_alt_11, 10_alt_13, 10_alt_16, 10_alt_18, 10_alt_31, 10_alt_33, 10_alt_36, 10_alt_38, 10_alt_51, 10_alt_53, 10_alt_56, 10_alt_58, 10_alt_71, 10_alt_73, 10_alt_76, 10_alt_78, 10_fill_15, 10_fill_17, 10_fill_30, 10_fill_32, 10_fill_35, 10_fill_37, 10_fill_45, 10_fill_47, 10_fill_50, 10_fill_52, 10_fill_55, 10_fill_57, 10_fill_60, 10_fill_62, 10_fill_65, 10_fill_67, 10_fill_70, 10_fill_72, 10_fill_75, 10_fill_77, 10_rand_19, 10_rand_34, 10_rand_39, 10_rand_49, 10_rand_54, 10_rand_59, 10_rand_64, 10_rand_69, 10_rand_74, 10_rand_79, 10_rand_80, 10_rand_81, 10_rand_82, 10_rand_83, 10_rand_84, 10_rand_85, 10_rand_86, 10_rand_87, 10_rand_88, 10_rand_89, 10_rand_90, 10_rand_91, 10_rand_92, 10_rand_93, 10_rand_94, 10_rand_95, 10_rand_96, 10_rand_97, 10_rand_98, 10_rand_99
Case Name Status Exec Time Memory
00_alt_01 AC 1 ms 256 KB
00_alt_03 AC 1 ms 256 KB
00_alt_06 AC 1 ms 256 KB
00_alt_08 AC 1 ms 256 KB
00_alt_21 AC 1 ms 256 KB
00_alt_23 AC 1 ms 256 KB
00_alt_26 AC 1 ms 256 KB
00_alt_28 AC 1 ms 256 KB
00_alt_41 AC 1 ms 256 KB
00_alt_43 AC 1 ms 256 KB
00_alt_46 AC 1 ms 256 KB
00_alt_48 AC 1 ms 256 KB
00_alt_61 AC 1 ms 256 KB
00_alt_63 AC 1 ms 256 KB
00_alt_66 AC 1 ms 256 KB
00_alt_68 AC 1 ms 256 KB
00_fill_00 AC 1 ms 256 KB
00_fill_02 AC 1 ms 256 KB
00_fill_05 AC 1 ms 256 KB
00_fill_07 AC 1 ms 256 KB
00_fill_10 AC 1 ms 256 KB
00_fill_12 AC 1 ms 256 KB
00_fill_20 AC 1 ms 256 KB
00_fill_22 AC 1 ms 256 KB
00_fill_25 AC 1 ms 256 KB
00_fill_27 AC 1 ms 256 KB
00_fill_40 AC 1 ms 256 KB
00_fill_42 AC 1 ms 256 KB
00_rand_04 AC 1 ms 256 KB
00_rand_09 AC 1 ms 256 KB
00_rand_14 AC 1 ms 256 KB
00_rand_24 AC 1 ms 256 KB
00_rand_29 AC 1 ms 256 KB
00_rand_44 AC 1 ms 256 KB
00_sample_1 AC 1 ms 256 KB
10_alt_11 AC 1 ms 256 KB
10_alt_13 AC 1 ms 256 KB
10_alt_16 AC 157 ms 6144 KB
10_alt_18 AC 152 ms 6144 KB
10_alt_31 AC 1 ms 256 KB
10_alt_33 AC 1 ms 256 KB
10_alt_36 AC 153 ms 6144 KB
10_alt_38 AC 157 ms 6144 KB
10_alt_51 AC 1 ms 256 KB
10_alt_53 AC 1 ms 256 KB
10_alt_56 AC 152 ms 6144 KB
10_alt_58 AC 152 ms 6144 KB
10_alt_71 AC 1 ms 256 KB
10_alt_73 AC 1 ms 256 KB
10_alt_76 AC 151 ms 6144 KB
10_alt_78 AC 158 ms 6144 KB
10_fill_15 AC 1 ms 256 KB
10_fill_17 AC 2 ms 256 KB
10_fill_30 AC 1 ms 256 KB
10_fill_32 AC 1 ms 256 KB
10_fill_35 AC 2 ms 256 KB
10_fill_37 AC 2 ms 256 KB
10_fill_45 AC 1 ms 256 KB
10_fill_47 AC 1 ms 256 KB
10_fill_50 AC 1 ms 256 KB
10_fill_52 AC 1 ms 256 KB
10_fill_55 AC 3 ms 256 KB
10_fill_57 AC 3 ms 256 KB
10_fill_60 AC 2 ms 256 KB
10_fill_62 AC 2 ms 256 KB
10_fill_65 AC 2 ms 256 KB
10_fill_67 AC 2 ms 256 KB
10_fill_70 AC 3 ms 384 KB
10_fill_72 AC 3 ms 384 KB
10_fill_75 AC 152 ms 6144 KB
10_fill_77 AC 151 ms 6144 KB
10_rand_19 AC 1 ms 256 KB
10_rand_34 AC 1 ms 256 KB
10_rand_39 AC 2 ms 256 KB
10_rand_49 AC 1 ms 256 KB
10_rand_54 AC 1 ms 256 KB
10_rand_59 AC 3 ms 256 KB
10_rand_64 AC 2 ms 256 KB
10_rand_69 AC 2 ms 256 KB
10_rand_74 AC 3 ms 384 KB
10_rand_79 AC 160 ms 6144 KB
10_rand_80 AC 160 ms 6144 KB
10_rand_81 AC 160 ms 6144 KB
10_rand_82 AC 160 ms 6144 KB
10_rand_83 AC 161 ms 6144 KB
10_rand_84 AC 160 ms 6144 KB
10_rand_85 AC 160 ms 6144 KB
10_rand_86 AC 161 ms 6144 KB
10_rand_87 AC 160 ms 6144 KB
10_rand_88 AC 162 ms 6144 KB
10_rand_89 AC 162 ms 6144 KB
10_rand_90 AC 56 ms 2304 KB
10_rand_91 AC 131 ms 5120 KB
10_rand_92 AC 61 ms 2432 KB
10_rand_93 AC 68 ms 2688 KB
10_rand_94 AC 35 ms 1536 KB
10_rand_95 AC 24 ms 1152 KB
10_rand_96 AC 36 ms 1536 KB
10_rand_97 AC 5 ms 384 KB
10_rand_98 AC 31 ms 1280 KB
10_rand_99 AC 13 ms 640 KB