File tree 6 files changed +35
-0
lines changed
6 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ 1
Original file line number Diff line number Diff line change
1
+ 3 2 2
2
+ 1 1 2
3
+ 2 1
Original file line number Diff line number Diff line change
1
+ 0
Original file line number Diff line number Diff line change
1
+ 2 2 999999937
2
+ 2 1
3
+ 3 1
Original file line number Diff line number Diff line change
1
+ // https://codeforces.com/contest/1316/problem/C
2
+ #include < bits/stdc++.h>
3
+
4
+ using namespace std ;
5
+ using ll = long long ;
6
+ using ii = tuple<int , int >;
7
+ using vi = vector<ll>;
8
+ using vii = vector<ii>;
9
+ using vvi = vector<vi>;
10
+ using si = set<ll>;
11
+
12
+ int main () {
13
+ cin.tie (0 ), ios::sync_with_stdio (0 );
14
+ ll n, m, p, a, b;
15
+ cin >> n >> m >> p;
16
+ int k = -1 , l = -1 ;
17
+ for (int i=0 ; i<n; i++) {
18
+ cin >> a;
19
+ if (a%p != 0 && k < 0 ) k=i;
20
+ }
21
+ for (int j=0 ; j<m; j++) {
22
+ cin >> b;
23
+ if (b%p != 0 && l < 0 ) l=j;
24
+ }
25
+ cout << k+l << endl;
26
+ }
Original file line number Diff line number Diff line change 3
3
There are solutions for the following [ codeforces] ( http://codeforces.com/ ) problems:
4
4
5
5
### Contests ([ problemset site] ( https://codeforces.com/problemset ) )
6
+ 1 . [ 1316C - Primitive Primes] ( 1316/c.cc ) ([ problem site] ( https://codeforces.com/contest/1316/problem/C ) )
6
7
1 . [ 1316B - String Modification] ( 1316/b.cc ) ([ problem site] ( https://codeforces.com/contest/1316/problem/B ) )
7
8
1 . [ 1316A - Grade Allocation] ( 1316/a.cc ) ([ problem site] ( https://codeforces.com/contest/1316/problem/A ) )
8
9
1 . [ 1315C - Restoring Permutation] ( 1315/c.cc ) ([ problem site] ( https://codeforces.com/contest/1315/problem/C ) )
You can’t perform that action at this time.
0 commit comments