QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#497279#9136. Exponent Calculatorucup-team1134AC ✓0ms3616kbC++231.6kb2024-07-28 22:04:542024-07-28 22:04:55

Judging History

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

  • [2024-07-28 22:04:55]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3616kb
  • [2024-07-28 22:04:54]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=15<<26;

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    vector<string> ans;
    ans.push_back("$3 = 0.5");
    ans.push_back("$4 = 0.1666666666666666");
    
    ans.push_back("$1 = $1 * 0.000030517578125");
    
    ans.push_back("$0 = 1 + $1");
    
    ans.push_back("$12 = $1 * $1");
    ans.push_back("$13 = $12 * $1");
    
    ans.push_back("$3 = $3 * $12");
    ans.push_back("$0 = $0 + $3");
    
    ans.push_back("$4 = $4 * $13");
    ans.push_back("$0 = $0 + $4");
    
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    ans.push_back("$0 = $0 * $0");
    
    cout<<si(ans)<<"\n";
    for(string S:ans) cout<<S<<"\n";
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3616kb

input:

input

output:

25
$3 = 0.5
$4 = 0.1666666666666666
$1 = $1 * 0.000030517578125
$0 = 1 + $1
$12 = $1 * $1
$13 = $12 * $1
$3 = $3 * $12
$0 = $0 + $3
$4 = $4 * $13
$0 = $0 + $4
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $...

result:

ok max relative diff is 1.99853e-10. Checker runtime is 188 ms

Extra Test:

score: 0
Extra Test Passed