UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#212247#3811. T1ZzhAllenCompile Error//C++1.2kb2024-10-13 15:55:312024-10-13 19:36:13

answer

//TOO MUCH HOMEWORK CAUSE THAT I WRITE A BAOLI 
#include <bits/stdc++.h>
#define F(i,x,y) for (int i = x; i <= y; i ++ )
#define D(i,x,y) for (int i = x; i >= y; i -- )
#define E(i,s) for (auto &i : s)
#define int long long
using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr int N = 2e5 + 10;
#define node pair<int,int> 
#define x first
#define y second
int t;

int get(node A, node B)
{
    return max(A.x + B.x, A.y + B.y);
}
vector<node> l, c;
map<node, bool> mpl,mpc;
int clac()
{
    int res = 1e18;
    E(t,l)
    if (mpl[t])
    E(v,c)
    if (mpc[v])
    res = min(res, get(t,v));
    return res == 1e18?-1:res;
}
void koishi()
{
    cin >> t;
    while (t -- )
    {
        int opt, d, a, b;
        cin >> opt >> d >> a >> b;
        if (opt)
        {
            if (d) l.push_back({a,b}), mpl[node{a,b}] = true;
            else c.push_back({a,b}), mpc[node{a,b}] = true;
        } else 
        {
            if (d) mpl[node{a,b}] = false;
            else mpc[node{a,b}] = false;
        }
        cout << clac() << '\n';
    }
}
#undef int
int main()
{
    ios::sync_with_stdio(NULL),cin.tie(nullptr),cout.tie(nullptr);
    koishi();
    return 0;
}

详细

answer.code:8:7: error: expected nested-name-specifier before 'll'
 using ll = long long;\x0d
       ^
answer.code:8:7: error: 'll' has not been declared
answer.code:8:10: error: expected ';' before '=' token
 using ll = long long;\x0d
          ^
answer.code:8:10: error: expected unqualified-id before '=' token
answer.code:9:7: error: expected nested-name-specifier before 'ull'
 using ull = unsigned long long;\x0d
       ^
answer.code:9:7: error: 'ull' has not been declared
answer.code:9:11: error: expe...