QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#260572#7758. Paintersmartyi#WA 0ms3632kbC++20570b2023-11-22 13:11:182023-11-22 13:11:19

Judging History

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

  • [2023-11-22 13:11:19]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3632kb
  • [2023-11-22 13:11:18]
  • 提交

answer

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#define int long long
using namespace std;
const int INF = 1e9;
const int N = 1e6 + 10;
const double eps = 1e-7;
int n, m;
int a[N];
signed main() {
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double res = 0;
    for (int i = 1; i <= n; i++) {
        res /= 2;
        res += a[i];
        if (abs(res) <= eps)
            cout << "0";
        else if (res < 0)
            cout << "-";
        else
            cout << "+";
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7
Circle 0 0 5 *
Circle -2 2 1 @
Circle 2 2 1 @
Rectangle 0 -1 0 0 ^
Rectangle -2 -2 2 -2 _
Render -5 -5 5 5
Render -1 0 1 2

output:

0000000

result:

wrong answer 1st lines differ - expected: '.....*.....', found: '0000000'