Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define fastio ios_base::sync_with_stdio(0); cin.tie(0)
- signed main()
- {
- fastio;
- /*
- // Junior B
- int n , k;
- cin >> n >> k;
- int x = n % k;
- int y = abs(y - k);
- cout << min(x , y);
- */
- /*
- // Junior A
- int n , k;
- cin >> n >> k;
- int x = k / n , y = k % n;
- int sum = 0;
- if(x > 0){
- sum += k - n;
- }
- if(x < n - 1){
- sum += k + n;
- }
- if(y > 0){
- sum += k - 1;
- }
- if(y < n - 1){
- sum += k + 1;
- }
- cout << sum;
- */
- /*
- // Senior A
- int n , s , m , q;
- cin >> n >> s;
- int ans = 0;
- bool ok = 0;
- for(int i = 0; i < n; i++){
- cin >> m >> q;
- if(m * 100 + q <= s * 100){
- ok = 1;
- if(q != 0){
- ans = max(ans , 100 - q);
- }
- }
- }
- if(ok == 0)
- cout << -1;
- else
- cout << ans;
- */
- /*
- // Senior B
- int n , x;
- cin >> n;
- bool used[n + 1] = {0};
- for(int i = 0; i < n; i++){
- cin >> x;
- used[x] = 1;
- }
- for(int i = 1; i <= n; i++){
- if(used[i] == 0){
- cout << i;
- return 0;
- }
- }
- cout << -1;
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement