hiho week 261 register

Ended

Participants:52

Verdict:Accepted
Score:100 / 100
Submitted:2019-07-02 18:39:27

Lang:G++

Edit
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
31
//
//  main.cpp
//  
//
//  Created by Jiao Liu on 7/2/19.
//  Copyright © 2019 ChangHong. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
int n,a[10],b[10],c[10];
bool subCheck(int *x, int *y)
{
    for (int i = 1; i < 10; i++) {
        if (x[i] >= 2) {
            int tx[10], ty[10];
            for (int j = 1; j < 10; j++) {
                tx[j] = x[j];
                ty[j] = y[j];
            }
            tx[i] -= 2;
            int count = 0;
            for (int j = 1; j < 10; j++) {
                if (tx[j] >= 3) {
                    int l = max(1, j-2);
                    int r = min(9, j+2);
                    vector<int> tmp;
                    for (int k = l; k <= r; k++) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX