# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
493794 | nathanlee726 | Group Photo (JOI21_ho_t3) | C++14 | 420 ms | 392496 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define pii pair<int,int>
#define X first
#define Y second
#define F(n) Fi(i,n)
#define Fi(i,n) Fl(i,0,n)
#define Fl(i,l,n) for(int i=l;i<n;i++)
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define abs(x) ((x)>0?(x):-(x))
#define pb push_back
int n,tab[5005][5005],stab[5005][5005],a[5005],b[5005],dp[5005];
int qry(int l1,int r1,int l2,int r2){
//cout<<l1<<" "<<r1<<" "<<l2<<" "<<r2<<endl;
//cout<<stab[r1][r2]<<" "<<stab[r1][l2-1]<<" "<<stab[l1-1][r2]<<" "<<stab[l1-1][l2-1]<<endl;
return stab[r1][r2]-stab[r1][l2-1]-stab[l1-1][r2]+stab[l1-1][l2-1];
}
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);
cin>>n;
F(n)cin>>a[i],b[a[i]]=i;
int s=0;
memset(tab,0,sizeof(tab));
F(n)for(int j=i+1;j<n;j++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |