Task: | Finding inverse |
Sender: | HFalke |
Submission time: | 2024-11-16 21:09:02 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | details |
#2 | RUNTIME ERROR | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | RUNTIME ERROR | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | WRONG ANSWER | 0.00 s | details |
#8 | ACCEPTED | 0.00 s | details |
#9 | WRONG ANSWER | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | ACCEPTED | 0.00 s | details |
#12 | WRONG ANSWER | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | ACCEPTED | 0.00 s | details |
Code
#include <bits/stdc++.h> using namespace std; //Definitions for quicker writing #define REP(i,a,b) for (int i = a; i < b; i++) #define clz __builtin_clz #define ctz __builtin_ctz #define popct __builtin_popcount #define PB push_back #define MP make_pair #define F first #define S second #define X real() #define Y imag() //Typedefs for quicker writing typedef long long ll; typedef vector<int> vi; typedef vector<long long> vl; typedef pair<int,int> pi; typedef pair<long long, long long> pl; typedef complex<long long> po; //Max values const long long lmx = LLONG_MAX; const int imx = INT_MAX; int main() { //IO optimization ios::sync_with_stdio(0); cin.tie(0); //Input definition ll a,m; //Read In cin >> a >> m; //Main part ll res; if((m+1)%a==0) res = (m+1)/a; else res = -1; //Write out cout << res << "\n"; //Return return 0; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
6 7 |
correct output |
---|
6 |
user output |
---|
-1 |
Test 2
Verdict: RUNTIME ERROR
input |
---|
0 7 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Test 3
Verdict: WRONG ANSWER
input |
---|
5 78 |
correct output |
---|
47 |
user output |
---|
-1 |
Test 4
Verdict: WRONG ANSWER
input |
---|
89 99 |
correct output |
---|
89 |
user output |
---|
-1 |
Test 5
Verdict: RUNTIME ERROR
input |
---|
0 61 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Test 6
Verdict: WRONG ANSWER
input |
---|
897 947 |
correct output |
---|
625 |
user output |
---|
-1 |
Test 7
Verdict: WRONG ANSWER
input |
---|
419 538 |
correct output |
---|
217 |
user output |
---|
-1 |
Test 8
Verdict: ACCEPTED
input |
---|
32 938 |
correct output |
---|
-1 |
user output |
---|
-1 |
Test 9
Verdict: WRONG ANSWER
input |
---|
184120 505187 |
correct output |
---|
438779 |
user output |
---|
-1 |
Test 10
Verdict: WRONG ANSWER
input |
---|
264601 885661 |
correct output |
---|
360221 |
user output |
---|
-1 |
Test 11
Verdict: ACCEPTED
input |
---|
40310 590135 |
correct output |
---|
-1 |
user output |
---|
-1 |
Test 12
Verdict: WRONG ANSWER
input |
---|
202254499 577081420 |
correct output |
---|
128866679 |
user output |
---|
-1 |
Test 13
Verdict: WRONG ANSWER
input |
---|
539836073 888851205 |
correct output |
---|
797044652 |
user output |
---|
-1 |
Test 14
Verdict: ACCEPTED
input |
---|
697847215 756971670 |
correct output |
---|
-1 |
user output |
---|
-1 |