QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#401650 | #7102. Live Love | miaokx# | WA | 0ms | 3644kb | C++20 | 757b | 2024-04-29 07:02:27 | 2024-04-29 07:02:27 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
void solve() {
int n, m;
cin >> n >> m;
cout << m << ' ';
if (!m) {
cout << m << '\n';
return;
}
// if (n-m >= m-1) {
// cout << 1 << '\n';
// } else {
int l = n-m;
int res = m - m / (l+1) * l;
assert(res >= m/(l+1));
cout << res << '\n';
// }
}
int main() {
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
int t;
cin >> t;
while (t--)
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3644kb
input:
5 5 4 100 50 252 52 3 0 10 10
output:
4 2 50 50 52 52 0 0 10 10
result:
wrong answer 2nd lines differ - expected: '50 1', found: '50 50'