-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdiff_Main.cpp
More file actions
58 lines (54 loc) · 1.3 KB
/
Copy pathdiff_Main.cpp
File metadata and controls
58 lines (54 loc) · 1.3 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
diff --git a/CodeJam/Main.cpp b/examples/2020/Qualification/A/Main.cpp
index 2150379..39ea2bb 100644
--- a/CodeJam/Main.cpp
+++ b/examples/2020/Qualification/A/Main.cpp
@@ -5,7 +5,7 @@
#define IA_ERROR_CODE -1
#define IA_COMM_LOG //add comment on this line, to deactivate the interactive communication error log
// #define XY_NOTATION //remove commment on this line, to activate xy notation on complex numbers
-#define COMM_TYPE ll
+#define COMM_TYPE v(ll)
// The maintained and empty code template can be found at:
// https://github.com/demmerichs/CodeJamTemplate
@@ -1570,11 +1570,44 @@ void init(){
cin >> T;
}
+ll k, N;
+v(v(ll)) Mij;
+v(s(ll)) rc, cc;
+
void readInput(){
+ cin >> N;
+ Mij.cl;
+ rc.cl;
+ cc.cl;
+ rc = v(s(ll))(N);
+ cc = v(s(ll))(N);
+ ll t;
+ k = 0;
+ forn(i,N){
+ Mij.pb(v(ll)());
+ forn(j,N){
+ cin >> t;
+ Mij.bk.pb(t);
+ rc[i].insert(t-1);
+ cc[j].insert(t-1);
+ if(i==j){
+ k+=t;
+ }
+ }
+ }
}
// write to COMM_TYPE result
void calcFunction() {
+ result.cl;
+ result.pb(k);
+ ll r=0, c=0;
+ forn(i, N){
+ r+= rc[i].sz < N;
+ c += cc[i].sz < N;
+ }
+ result.pb(r);
+ result.pb(c);
}
} // namespace task