-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstarter.cpp
More file actions
113 lines (80 loc) · 1.67 KB
/
Copy pathstarter.cpp
File metadata and controls
113 lines (80 loc) · 1.67 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
// Type aliases
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
// Macros
#define endl '\n'
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
// Constants
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll LLINF = 1e18;
const double EPS = 1e-9;
// Fast I/O
void fastIO() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
}
// Debug (comment out before submission)
#define debug(x) cerr << #x << " = " << x << endl
void solve() {
int n;
int temp = n;
int Rowcount = 0;
int ans = 0;
cin >> n;
vector<vector<int>> a(n, vector<int>(3));
for (size_t i = 0; i < a.size(); i++)
{
/* code */
for (size_t j = 0; j < a[i].size(); j++)
{
/* code */
cin >> a[i][j];
}
}
for (size_t i = 0; i < a.size(); i++)
{
for (size_t j = 0; j < a[i].size(); j++)
{
if (a[i][j] !=0 )
{
Rowcount++;
}
}
if (Rowcount >= 2)
{
ans++;
Rowcount = 0;
}
Rowcount= 0;
/* code */
}
cout << ans << endl;
}
int main() {
fastIO();
// cin >> t; // Uncomment for multiple test cases
int t = 1;
while (t--) {
solve();
}
return 0;
}