QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#323069#147. FloppySkyanCompile Error//C++231.0kb2024-02-08 12:14:542024-02-08 12:15:12

Judging History

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

  • [2024-02-08 12:15:12]
  • 评测
  • [2024-02-08 12:14:54]
  • 提交

floppy

#include <bits/stdc++.h>
#include "floppy.h"
using namespace std;
void read_array(int subtask_id, const std::vector<int> &v) {
    string res = "";
    stack<int> t;
    for (int i = 0; i < v.size(); i++) {
        while (!t.empty() && t.top() <= v[i]) {
            res += '0';
            t.pop();
        }
        t.push(v[i]);
        res += '1';
    }
    save_to_floppy(res);
}
vector<int> g[200005];
std::vector<int> solve_queries(int subtask_id, int N, const std::string &bits, const std::vector<int> &a, const std::vector<int> &b) {
    int n = bits.size(), q = a.size(), c = 0;
    vector<int> v, res(q);
    for (int i = 0; i < q; i++) {
        g[b[i]].push_back(i);
    }
    for (int i = 0; i < N; i++) {
        while (bits[c] == '0') {
            v.pop_back();
            c++;
        }
        v.push_back(i);
        for (int j = 0; j < g[i].size(); j++) {
            res[g[i][j]] = *lower_bound(v.begin(), v.end(), a[g[i][j]]);
        }
        c++;
    }
    return res;
}


Details

grader_floppy.cpp: In function ‘void my_fprintf(FILE*, const char*, ...)’:
grader_floppy.cpp:17:9: error: ‘exit’ was not declared in this scope
   17 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void my_fscanf(FILE*, int, const char*, ...)’:
grader_floppy.cpp:26:9: error: ‘exit’ was not declared in this scope
   26 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void save_to_floppy(const string&)’:
grader_floppy.cpp:51:5: error: ‘exit’ was not declared in this scope
   51 |     exit(0);
      |     ^~~~
grader_floppy.cpp: In function ‘int main(int, char**)’:
grader_floppy.cpp:91:15: error: ‘atoi’ was not declared in this scope
   91 |     int run = atoi(argv[1]);
      |               ^~~~