21402022-12-22 11:36:55BttrngEgykorúak (75 pont)cpp11Wrong answer 0/758ms3860 KiB
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    int pe, ph, pn;
    cin>>pe>>ph>>pn;
    int db=0;
    for(int i=1; i<=n; i++){
        int x, y, z;
        cin>>x>>y>>z;
        if(x-pe<=1){
            if(y<=ph && z<=pn) db++;
            if(x%4==0 && x-pe!=0 && y==ph && z==pn) db--;
        }
        else if(x-pe==-1){
            if(y>=ph && z>=pn) db++;
            if(x%4==0 && x-pe!=0 && y==ph && z==pn) db--;
        }
    }
    cout<<db;

}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1876 KiB
2Wrong answer0/08ms2124 KiB
3Wrong answer0/52ms2272 KiB
4Wrong answer0/52ms2380 KiB
5Wrong answer0/52ms2580 KiB
6Wrong answer0/52ms2780 KiB
7Wrong answer0/52ms3024 KiB
8Wrong answer0/52ms3060 KiB
9Wrong answer0/52ms3304 KiB
10Wrong answer0/53ms3388 KiB
11Wrong answer0/53ms3464 KiB
12Wrong answer0/54ms3616 KiB
13Wrong answer0/54ms3732 KiB
14Wrong answer0/54ms3740 KiB
15Wrong answer0/56ms3740 KiB
16Wrong answer0/57ms3740 KiB
17Wrong answer0/58ms3860 KiB