ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2060D - Subtract Min Sort
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;

int a[N];

void work() {
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    if (a[0] < a[1] && a[n - 2] < a[n - 1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        work();
    }
    return 0;
}



Submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;

int a[N];

void work() {
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    if (a[0] < a[1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        work();
    }
    return 0;
}
Problem: 2060D - Subtract Min Sort
Language: C++20 (GCC 13-64)


Submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;

int a[N];

void work() {
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    if (a[0] < a[1] && a[n - 2] < a[n - 1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        work();
    }
    return 0;
}
Problem: 2060D - Subtract Min Sort
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;

int a[N];

void work() {
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    if (a[0] < a[1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        work();
    }
    return 0;
}



Submission (verdict: Accepted):
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;

int a[N];

void work() {
    int n;
    cin >> n;

    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }

    for (int i = 1; i < n; i++) {
        if (a[i] <= a[i + 1] && a[i - 1] == 0) {
            a[i + 1] -= a[i];
            a[i] = 0;
        }

        if (a[i] > a[i + 1]) {
            cout << "no" << endl;
            return;
        }
    }
    cout << "yes" << endl;
}

int main() {
    int t;
    cin >> t;
    while (t--) {
        work();
    }
    return 0;
}
Problem: 2050C - Uninteresting Number
Language: PyPy 3-64


Submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 15)):
        if res == 0:
            for y in range(min(num3+1, 15)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")
Problem: 2050C - Uninteresting Number
Language: PyPy 3-64

Previous submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 10)):
        if res == 0:
            for y in range(min(num3+1, 10)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")





Submission (verdict: Runtime error on test 1):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inlt()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 10)):
        if res == 0:
            for y in range(min(num3+1, 10)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")
Problem: 2050C - Uninteresting Number
Language: PyPy 3-64

Previous submission (verdict: Runtime error on test 1):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inlt()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 10)):
        if res == 0:
            for y in range(min(num3+1, 10)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")

Submission (verdict: Accepted):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = insr()
    sum = 0
    num2 = 0
    num3 = 0
    for i in a:
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 10)):
        if res == 0:
            for y in range(min(num3+1, 10)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")
Problem: 2050C - Uninteresting Number
Language: PyPy 3-64

Previous submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 11)):
        if res == 0:
            for y in range(min(num3+1, 11)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")





Submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 10)):
        if res == 0:
            for y in range(min(num3+1, 10)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")
Problem: 2050C - Uninteresting Number
Language: PyPy 3-64

Previous submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 15)):
        if res == 0:
            for y in range(min(num3+1, 15)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")





Submission (verdict: Runtime error on test 4):
import sys
import math
import collections
import statistics
import bisect

input = sys.stdin.readline

############ ---- Input Functions ---- ############
##---1) inp — For taking integer inputs.
def inp():
    return (int(input()))

##2) inlt — For taking List inputs.
def inlt():
    return (list(map(int, input().split())))

#3) insr — For taking string inputs. Actually it returns a List of Characters,
# instead of a string, which is easier to use in Python, because in Python,
# Strings are Immutable.
def insr():
    s = input()
    return (list(s[:len(s) - 1]))

#4) invr — For taking space seperated integer variable inputs.
def invr():
    return list(map(int, input().split()))

for iii in range(int(input())):
    a = inp()
    sum = 0
    num2 = 0
    num3 = 0
    for i in str(a):
        sum += int(i)
        if i == '2':
            num2 += 1
        elif i == '3':
            num3 += 1
    if sum % 9 == 0:
        print("yes")
        continue
    res = 0
    for x in range(min(num2+1, 11)):
        if res == 0:
            for y in range(min(num3+1, 11)):
                if (sum + 2*x + 6*y) % 9 == 0:
                    print("yes")
                    res = 1
                    break
        else:
            break
    if res == 0:
        print("no")
Problem: 2052A - Adrenaline Rush
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Wrong answer on test 28):
#include <iostream>
#include <algorithm>

using namespace std;

int a[1005], cur[1005], ans[1005], ans1[1005];

int main(){
    int n;
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i <= n; i++){
        cur[i] = i;
    }
    for(int i = n; i >= 2; i--){
        int pos = 0;
        for(int j = 1; j <= n; j++){
            if(cur[j] == a[i]){
                pos = j;
                break;
            }
        }
        for(int j = pos; j >= 2; j--){
            cnt++;
            ans[cnt] = cur[j];
            ans1[cnt] = cur[j - 1];
            swap(cur[j], cur[j - 1]);
        }
        for(int j = 1; j <= i - 1; j++){
            cnt++;
            ans[cnt] = cur[j + 1];
            ans1[cnt] = cur[j];
            swap(cur[j], cur[j + 1]);
        }
    }
    
    cout << cnt << "\n";
    for(int i = 1; i <= cnt; i++){
        cout << ans[i] << " " << ans1[i] << "\n";
    }
    return 0;
}

Submission (verdict: Time limit exceeded on test 38):
#include <iostream>
#include <algorithm>

using namespace std;

int a[1005], cur[1005], ans[100005], ans1[100005];

int main(){
    int n;
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i <= n; i++){
        cur[i] = i;
    }
    for(int i = n; i >= 2; i--){
        int pos = 0;
        for(int j = 1; j <= n; j++){
            if(cur[j] == a[i]){
                pos = j;
                break;
            }
        }
        for(int j = pos; j >= 2; j--){
            cnt++;
            ans[cnt] = cur[j];
            ans1[cnt] = cur[j - 1];
            swap(cur[j], cur[j - 1]);
        }
        for(int j = 1; j <= i - 1; j++){
            cnt++;
            ans[cnt] = cur[j + 1];
            ans1[cnt] = cur[j];
            swap(cur[j], cur[j + 1]);
        }
    }
    
    cout << cnt << "\n";
    for(int i = 1; i <= cnt; i++){
        cout << ans[i] << " " << ans1[i] << "\n";
    }
    return 0;
}
Problem: 2052A - Adrenaline Rush
Language: C++23 (GCC 14-64, msys2)


Submission (verdict: Wrong answer on test 28):
#include <iostream>
#include <algorithm>

using namespace std;

int a[1005], cur[1005], ans[1005], ans1[1005];

int main(){
    int n;
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i <= n; i++){
        cur[i] = i;
    }
    for(int i = n; i >= 2; i--){
        int pos = 0;
        for(int j = 1; j <= n; j++){
            if(cur[j] == a[i]){
                pos = j;
                break;
            }
        }
        for(int j = pos; j >= 2; j--){
            cnt++;
            ans[cnt] = cur[j];
            ans1[cnt] = cur[j - 1];
            swap(cur[j], cur[j - 1]);
        }
        for(int j = 1; j <= i - 1; j++){
            cnt++;
            ans[cnt] = cur[j + 1];
            ans1[cnt] = cur[j];
            swap(cur[j], cur[j + 1]);
        }
    }
    
    cout << cnt << "\n";
    for(int i = 1; i <= cnt; i++){
        cout << ans[i] << " " << ans1[i] << "\n";
    }
    return 0;
}
Problem: 2052A - Adrenaline Rush
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Time limit exceeded on test 38):
#include <iostream>
#include <algorithm>

using namespace std;

int a[1005], cur[1005], ans[100005], ans1[100005];

int main(){
    int n;
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i <= n; i++){
        cur[i] = i;
    }
    for(int i = n; i >= 2; i--){
        int pos = 0;
        for(int j = 1; j <= n; j++){
            if(cur[j] == a[i]){
                pos = j;
                break;
            }
        }
        for(int j = pos; j >= 2; j--){
            cnt++;
            ans[cnt] = cur[j];
            ans1[cnt] = cur[j - 1];
            swap(cur[j], cur[j - 1]);
        }
        for(int j = 1; j <= i - 1; j++){
            cnt++;
            ans[cnt] = cur[j + 1];
            ans1[cnt] = cur[j];
            swap(cur[j], cur[j + 1]);
        }
    }
    
    cout << cnt << "\n";
    for(int i = 1; i <= cnt; i++){
        cout << ans[i] << " " << ans1[i] << "\n";
    }
    return 0;
}

Submission (verdict: Accepted):
#include <iostream>
#include <algorithm>

using namespace std;

int a[1005], cur[1005], ans[1000005], ans1[1000005];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    int cnt = 0;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i <= n; i++){
        cur[i] = i;
    }
    for(int i = n; i >= 2; i--){
        int pos = 0;
        for(int j = 1; j <= n; j++){
            if(cur[j] == a[i]){
                pos = j;
                break;
            }
        }
        for(int j = pos; j >= 2; j--){
            cnt++;
            ans[cnt] = cur[j];
            ans1[cnt] = cur[j - 1];
            swap(cur[j], cur[j - 1]);
        }
        for(int j = 1; j <= i - 1; j++){
            cnt++;
            ans[cnt] = cur[j + 1];
            ans1[cnt] = cur[j];
            swap(cur[j], cur[j + 1]);
        }
    }
    
    cout << cnt << "\n";
    for(int i = 1; i <= cnt; i++){
        cout << ans[i] << " " << ans1[i] << "\n";
    }
    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
void solve()
{
    int l,r;
    int a;
    cin>>l>>r;
    int s=l^r;
    if(r-l==2)  cout<<l<<' '<<l+1<<' '<<r<<endl;
    else
    {
        for(int i=30;i>=0;i--)
            if(1<<i & s)
            {
                a=i;
                break;
            }
        int x,y,z;
        x=1<<a;
        y=x-1;
        z=l;
        cout<<x<<' '<<y<<' '<<z<<endl;
    }
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

Submission (verdict: Wrong answer on test 1):
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
void solve()
{
    int l,r;
    int a;
    cin>>l>>r;
    int s=l^r;
    if(r-l==2)  cout<<l<<' '<<l+1<<' '<<r<<endl;
    else
    {
        for(int i=30;i>=0;i--)
            if(1<<i & s)
            {
                a=i;
                break;
            }
        int x,y,z;
        x=(1<<a)-1 | l;
        y=x+1;
        if(x==l)    z=r;
        else    z=l;
        cout<<x<<' '<<y<<' '<<z<<endl;
    }
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
void solve()
{
    int l,r;
    int a;
    cin>>l>>r;
    int s=l^r;
    if(r-l==2)  cout<<l<<' '<<l+1<<' '<<r<<endl;
    else
    {
        for(int i=30;i>=0;i--)
            if(1<<i & s)
            {
                a=i;
                break;
            }
        int x,y,z;
        x=(1<<a)-1 | l;
        y=x+1;
        if(x==l)    z=r;
        else    z=l;
        cout<<x<<' '<<y<<' '<<z<<endl;
    }
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

Submission (verdict: Accepted):
#include <bits/stdc++.h>
#define OPEN_DEBUG 1
#define DEBUG if(OPEN_DEBUG)
using namespace std;typedef unsigned long long ULL; typedef long long LL; typedef pair<int,int> PII; typedef pair<LL,LL> PLL;
const int MOD = 1e9+7; const double EPI=1e-6; const int INF=0x3f3f3f3f; const LL LLINF=1e17;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0}; //RDLU
void YES() {cout<<"YES\n";} void NO(){cout<<"NO\n";} void Yes() {cout<<"Yes\n";} void No(){cout<<"No\n";} void endl(){cout << "\n";}
struct Edge {int x, y, z;};
LL qpow(LL a, LL b, LL p) { LL ans = 1; a = a % p; while(b) {if (b & 1) ans = (ans * a) % p; a = a * a % p; b >>= 1;} return ans;}
LL gcd(LL a, LL b) {if (!b) return a; return gcd(b, a % b);}
LL exgcd(LL a, LL b, LL& x, LL& y) {if (!b) {x = 1, y = 0; return a;} LL xx, yy; LL d = exgcd(b, a % b, xx, yy);x = yy;y = xx - a / b * yy;return d;}

bool MULTI_TESTS = 1;

int solve() {
    int l, r;
    cin >> l >> r;
    int x = 0;
    int j = 30;
    for (j = 30; j >= 0; j--) {
        if ( (l & (1 << j)) != (r & (1 << j))) {
            x |= (1 << j);
            break;
        }
    }
    x |= (l >> j << j) ;
    if (x == r) {
        cout << x - 2 << " " << x - 1 << " " << x << "\n";
    } else {
        cout << x - 1 << " " << x << " " << x + 1 << "\n";
    }

    
   

    return 0;
}

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    // cout << fixed << setprecision(2);

    int ttt = 1;
    if (MULTI_TESTS) cin >> ttt;
    for (int i = 1; i <= ttt; i++) {
        solve();
    }


    return 0;
}