首页 > TAG信息列表 > ABC246

abc246_d 2-variable Function

考虑到i不大于1e6,而使得f(i,j)大于n的最小的j是随i的增加单调减的,因此枚举即可。 // // Created by vv123 on 2022/4/2. // #include <bits/stdc++.h> #define f(i,j) i*i*i+i*i*j+i*j*j+j*j*j using namespace std; typedef long long LL; int main() { LL n, ans = 1e18, j

ABC246 简要题解

A 由题意模拟,在已知的 \(3\) 个点中仅出现 \(1\) 次的横坐标即为缺失的那个,纵坐标同理。 int a,b,c,d,e,f,x,y; map<int,int> cnt1,cnt2; signed main(){ cin>>a>>b>>c>>d>>e>>f; ++cnt1[a],++cnt1[c],++cnt1[e]; ++cnt2[b],++cnt2[d],++cnt2[f]; if(cnt1[