http://codeforces.com/contest/35

A

这场的输入输出是到文件中的,不是标准的输入输出。。。没注意看,RE了好久。。。

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 #define lson l,mid,rt<<1
 4 #define rson mid+1,r,rt<<1|1
 5 #define sqr(x) ((x)*(x))
 6 #define pb push_back
 7 #define eps 1e-8
 8 #define PI acos(-1.0)
 9 #define maxn 1000005
10 typedef long long ll;
11 typedef unsigned long long ull;
12 
13 /*#ifndef ONLINE_JUDGE
14         freopen("1.txt","r",stdin);
15 #endif */
16 
17 ifstream cinn("input.txt");
18 ofstream coutt("output.txt");
19 
20 int main(){
21     #ifndef ONLINE_JUDGE
22      //   freopen("1.txt","r",stdin);
23     #endif
24     std::ios::sync_with_stdio(false);
25     int u,v;
26     int b;
27 
28     int a[15];
29     memset(a,0,sizeof(a));
30     cinn>>b;
31     a[b]=1;
32     for(int i=0;i<3;i++){
33         cinn>>u>>v;
34         swap(a[u],a[v]);
35     }
36     for(int i=1;i<=3;i++){
37         if(a[i]==1){
38             coutt<<i;
39             return 0;
40         }
41     }
42     return 0;
43 }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-02
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案