QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#650283#7858. Basic Equation SolvingMrlaolu#WA 0ms3660kbC++23880b2024-10-18 14:26:342024-10-18 14:26:36

Judging History

你现在查看的是最新测评结果

  • [2024-10-18 14:26:36]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3660kb
  • [2024-10-18 14:26:34]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;

using LL = long long;

void solve(){

    int a, b, m;

    cin >> a >> b >> m;

    LL ans = 160 * 2;
    if(a > b){
        ans += (m / b) * 160LL;
        cout << ans << "\n";
        return; 
    }
    int last1 = 0, last2 = 0, suc1 = 0, suc2 = 0;
    for(int i = 1; i <= m; i ++){
        if(!suc2 && i - last2 >= b){
            suc2 = 1;
        }
        if(i - last1 >= a){
            ans += 160;
            last1 = i; 
            if(suc2){
                ans += 160;
                suc2 = 0;
                last2 = i; 
            }
        }
    }
    if(suc2) ans += 160;
    cout << ans << "\n";
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    cin >> _; 
    while(_--){
        solve();
    }
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3660kb

input:

1
P=NP

output:

320

result:

wrong answer 1st lines differ - expected: '766136394', found: '320'