QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#112852 | #5. 在线 O(1) 逆元 | yx20201301 | Compile Error | / | / | C++20 | 2.9kb | 2023-06-14 23:50:58 | 2024-11-05 21:50:46 |
Judging History
你现在查看的是最新测评结果
- [2024-11-05 21:50:46]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-06-14 23:51:00]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-06-14 23:50:58]
- 提交
answer
// #pragma GCC optimize("Ofast,inline,unroll-loops")
// #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define File(s) freopen(#s".in","r",stdin),freopen(#s".out","w",stdout)
#ifdef GTRAKIOI
#define defrog(...) fprintf(stderr,__VA_ARGS__)
#else
#define defrog(...) 1
#endif
#define defrogf(...) defrog(__VA_ARGS__)
#if __cplusplus>=201703L
#define rg
#else
#define rg register
#endif
#define ri rg int
typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int,int>pii;
typedef std::vector<int>vi;
typedef std::vector<ll>vll;
typedef std::vector<pii>vpii;
typedef std::vector<vi >vvi;
typedef long double ld;
typedef __int128 i128;
typedef __uint128_t u128;
#define Tp template<typename T>
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define all(cont) cont.begin(),cont.end()
char ibuf[1<<15],*p1,*p2;
#define getchar() (p1==p2&&(p2=(p1=ibuf)+fread(ibuf,1,1<<15,stdin),p1==p2)?EOF:*p1++)
struct FastIO{
/*inline void ou128(u128 x){
u128 y=1;
while(y<=x/10)y*=10;
do putchar(x/y|48),x%=y,y/=10;while(y);
}*/
inline int rint(){rg char c,f=0;while((c=getchar())<48||c>57)f|=c=='-';ri unsigned a=c&15;while((c=getchar())>=48&&c<=57)a=a*10+(c&15);return f?~a+1:a;}
inline ll rll(){rg char c,f=0;while((c=getchar())<48||c>57)f|=c=='-';rg ull a=c&15;while((c=getchar())>=48&&c<=57)a=a*10+(c&15);return f?~a+1:a;}
// inline operator int(){return rint();}
inline operator ll(){return rll();}
inline char rchar(){rg char c;while(!isgraph(c=getchar()));return c;}
inline int rstr(char*s){rg char c;while(!isgraph(c=getchar()));int cnt=-1;do s[++cnt]=c;while(isgraph(c=getchar()));s[++cnt]=0;return cnt;}
}g90;
std::mt19937 rng(std::chrono::high_resolution_clock::now().time_since_epoch().count());
inline int rnd(const int&a,const int&b){
return std::uniform_int_distribution<int>(a,b)(rng);
}
inline ld rnd(const ld&a,const ld&b){
return std::uniform_real_distribution<ld>(a,b)(rng);
}
namespace MY_STD{
Tp inline T abs(const T&a){return a<0?-a:a;}
}
struct DSU{//unweighted
using key_type=int;
std::vector<key_type>fa,size;
inline DSU(key_type n):fa(n),size(n,1){std::iota(fa.begin(),fa.end(),0);}
inline key_type& getFa(key_type x){
while(x^fa[x])x=fa[x]=fa[fa[x]];
return fa[x];
}
inline key_type& operator[](const key_type&x){return getFa(x);}
inline auto canMerge(const key_type&u,const key_type&v){return getFa(u)!=getFa(v);}
inline bool merge(key_type u,key_type v){
u=getFa(u),v=getFa(v);
return (u)!=(v)&&(size[u]<size[v]&&(std::swap(u,v),1),fa[v]=u,size[u]+=size[v],size[v]=0,true);
}
};
constexpr int N=100001000,M=998244353;
inline int qpow(ll a,ll b){ri res=1;for(;b;a=a*a%M,b>>=1)if(b&1)res=res*a%M;return res;}
#define pow qpow
int inv[N];
inline void init(int p){
inv[1]=1;
for(int i=2;i<N;++i)inv[i]=ll(M-M/i)*inv[M%i]%M;
}
inline int inv(int x){
return inv[i];
}
Details
implementer.cpp: In function ‘int main()’: implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 22 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ answer.code:87:21: error: ‘int inv(int)’ redeclared as different kind of entity 87 | inline int inv(int x){ | ^ answer.code:82:5: note: previous declaration ‘int inv [100001000]’ 82 | int inv[N]; | ^~~ answer.code: In function ‘int inv(int)’: answer.code:88:20: error: ‘i’ was not declared in this scope 88 | return inv[i]; | ^