ACM ICPC 2008–2009, NEERC, Northern Subregional Contest :I题: Important Wires

题目链接:

点击打开链接


I  题题意

输出为真的情况   :  A | B | C | ~C


[code]

#include <iostream>
#include <bits/stdc++.h>
typedef long long ll;
const int MAXN=1e5+5;
using namespace std;


vector<ll>V,ans;
int main()
{
    freopen("important.in","r",stdin);
    freopen("important.out","w",stdout);
    int n;
    cin>>n;
    cout<<"Yes"<<endl;
    getchar();
    string str[MAXN];
    for(int i=1;i<=n;i++)
    {
        getline(cin,str[i]);
        //cout<<str[i]<<endl;
    }
    for(int i=1;i<=n;i++)
        cout<<str[i][0]<<" |";
    cout<<"~"<<str[n][0]<<endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}

posted @ 2018-04-10 12:50  Sizaif  阅读(312)  评论(0编辑  收藏  举报