Submission #244440
Source Code Expand
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <ctime> #include <set> #include <iostream> #include <memory> #include <string> #include <cstring> #include <vector> #include <algorithm> #include <functional> #include <fstream> #include <sstream> #include <complex> #include <stack> #include <queue> #include <cstring> #include <numeric> #include <cassert> using namespace std; static const double EPS = 1e-10; typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);(i)++) #define rev(i,n) for(int i=(n)-1;(i)>=0;(i)--) #define all(a) a.begin(),a.end() #define mp(a,b) make_pair(a,b) #define pb(a) push_back(a) #define SS stringstream #define DBG1(a) rep(_X,sz(a)){printf("%d ",a[_X]);}puts(""); #define DBG2(a) rep(_X,sz(a)){rep(_Y,sz(a[_X]))printf("%d ",a[_X][_Y]);puts("");} #define bitcount(b) __builtin_popcountll(b) #define gcd(a,b) (__gcd((a),(b))) #define lcm(a,b) ( (a) / gcd((a),(b)) * (b) ) template<typename T, typename S> vector<T>& operator<<(vector<T>& a, S b) { a.push_back(b); return a; } template<typename T> void operator>>(vector<T>& a, int b) {while(b--)if(!a.empty())a.pop_back();} bool isprime(int n){ if(n<2)return false; for(int i=2;i*i<=n;i++)if(n%i==0)return false; return true;} const long long mod = 1000000007ll; ll b_pow(ll x,ll n){return n ? b_pow(x*x%mod,n/2)*(n%2?x:1)%mod : 1ll;} string itos(int n){stringstream ss;ss << n;return ss.str();} long long in(){ long long x; cin >> x; return x; } int main(){ string s; getline(cin,s); s += " "; set<string> ss; for(int i = 0 ; i < s.size() ; ){ if( s[i] == '@' ){ i++; string t; while(s[i]>='a' && s[i] <= 'z') t += s[i++]; if( t != "" ) ss.insert(t); }else i++; } for( set<string>::iterator it = ss.begin(); it != ss.end(); ++it) cout << *it << endl; }
Submission Info
Submission Time | |
---|---|
Task | C - 次世代SNS |
User | kyuridenamida |
Language | C++ (G++ 4.6.4) |
Score | 100 |
Code Size | 1933 Byte |
Status | AC |
Exec Time | 28 ms |
Memory | 932 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 26 ms | 740 KB |
sample_02.txt | AC | 28 ms | 672 KB |
test_01.txt | AC | 25 ms | 680 KB |
test_02.txt | AC | 25 ms | 928 KB |
test_03.txt | AC | 25 ms | 680 KB |
test_04.txt | AC | 27 ms | 680 KB |
test_05.txt | AC | 25 ms | 804 KB |
test_06.txt | AC | 23 ms | 676 KB |
test_07.txt | AC | 25 ms | 808 KB |
test_08.txt | AC | 23 ms | 800 KB |
test_09.txt | AC | 25 ms | 804 KB |
test_10.txt | AC | 23 ms | 680 KB |
test_11.txt | AC | 23 ms | 804 KB |
test_12.txt | AC | 24 ms | 676 KB |
test_13.txt | AC | 25 ms | 932 KB |
test_14.txt | AC | 25 ms | 804 KB |
test_15.txt | AC | 23 ms | 680 KB |
test_16.txt | AC | 25 ms | 928 KB |
test_17.txt | AC | 23 ms | 676 KB |
test_18.txt | AC | 25 ms | 736 KB |
test_19.txt | AC | 23 ms | 800 KB |
test_20.txt | AC | 25 ms | 804 KB |