답안 #955320

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
955320 2024-03-30T06:17:43 Z vjudge1 IOI 바이러스 (JOI21_fever) C++17
6 / 100
19 ms 43868 KB
#include <bits/stdc++.h>

#pragma optimize("Ofast")
#pragma target("avx2")

using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define pii pair<int,int>
#define all(v) v.begin(),v.end()
#define F first
#define S second
#define mem(a,i) memset(a,i,sizeof(a))
#define sz(s) (int)s.size()
#define y1 yy
#define ppb pop_back
#define lb lower_bound
#define ub upper_bound
#define gcd(a,b) __gcd(a,b)
#define in insert
#define int ll

const int MAX=1e5+15;
const int B=300;
const int N=104;
const int block=400;
const int maxB=MAX/B+10;
const ll inf=1e18;  
const int mod=998244353;
const int mod1=1e9+9;
const ld eps=1e-9;

int dx[8]={1,0,-1,0,1,-1,-1,1};
int dy[8]={0,1,0,-1,1,-1,1,-1};

int binpow(int a,int n){
  if(!n)return 1;
  if(n%2==1)return a*binpow(a,n-1)%mod;
  int k=binpow(a,n/2);
  return k*k%mod;
}

int n;
pii a[MAX];
set<int> d;
map<int,int> mp;
vector<int> g[MAX*16];
int cur;

int pos(int v,int nap){
  return (nap-1)*n+v;
}

vector<pii> vec[MAX];
int vertin[MAX],vertout[MAX];

void add(int x,int y){
  g[x].pb(y);
}

int cnt;
int use[16*MAX];

void dfs(int v){
  use[v]=1;
  if(v<=4*n)cnt++;
  for(auto to:g[v]){
    if(use[to])continue;
    dfs(to);
  }
}

void solve(){
  cin>>n;
  cur=4*n;
  int ans=0;
  for(int i=1;i<=n;i++){
    cin>>a[i].F>>a[i].S;
    ans+=(a[i].F==a[i].S);
  }   
  cout<<ans;
}

signed main(){
  //  freopen("help.in","r",stdin);
  //  freopen("help.out","w",stdout);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  // prec();
  int t=1;
  // cin>>t;  
  while(t--)solve();
}

Compilation message

fever.cpp:3: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    3 | #pragma optimize("Ofast")
      | 
fever.cpp:4: warning: ignoring '#pragma target ' [-Wunknown-pragmas]
    4 | #pragma target("avx2")
      |
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 43868 KB Output is correct
2 Correct 10 ms 43396 KB Output is correct
3 Correct 10 ms 43356 KB Output is correct
4 Correct 9 ms 43368 KB Output is correct
5 Correct 10 ms 43356 KB Output is correct
6 Correct 9 ms 43452 KB Output is correct
7 Correct 9 ms 43356 KB Output is correct
8 Correct 9 ms 43356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 43356 KB Output is correct
2 Incorrect 10 ms 43356 KB Output isn't correct
3 Halted 0 ms 0 KB -