Submission #474931


Source Code Expand

Copy
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
#define mp1(a,b,c) P1(a,P(b,c))

const int INF=1000000000;
const int dir_4[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
const int dir_8[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};

int main(){
	string s;
	cin >> s;
	if(s == "{}"){
		puts("dict");
		return 0;
	}
	
	int d = 0;
	rep(i,s.size()){
		if(s[i] == '{')d ++;
		else if(s[i] == '}')d --;
		else if(d == 1){
			if(s[i] == ','){
				puts("set");
				return 0;
			}
			else if(s[i] == ':'){
				puts("dict");
				return 0;
			}
		}
	}
	
	puts("dict");
	return 0;
}

Submission Info

Submission Time
Task B - 天下一リテラル
User yokozuna57
Language C++11 (GCC 4.9.2)
Score 0
Code Size 1372 Byte
Status
Exec Time 28 ms
Memory 932 KB

Judge Result

Set Name Score / Max Score Test Cases
All 0 / 40 00_example_1.txt, 00_example_2.txt, 00_example_3.txt, 00_large_00.txt, 00_large_01.txt, 00_small_00.txt, 00_small_01.txt, 00_small_02.txt, 00_small_03.txt, 00_small_04.txt, 00_small_05.txt, 00_small_08.txt, 00_small_09.txt, 00_small_10.txt, 00_small_11.txt, 00_small_12.txt, 00_small_13.txt, 00_small_15.txt, 00_small_16.txt, 00_small_17.txt, 00_small_18.txt, 00_small_20.txt, 00_small_21.txt, 00_small_22.txt, 00_small_23.txt, 10_random_dict_00.txt, 10_random_dict_01.txt, 10_random_dict_02.txt, 10_random_dict_03.txt, 10_random_dict_04.txt, 10_random_dict_05.txt, 10_random_dict_06.txt, 10_random_dict_07.txt, 10_random_dict_08.txt, 10_random_dict_09.txt, 10_random_dict_10.txt, 10_random_dict_11.txt, 10_random_dict_12.txt, 10_random_dict_13.txt, 10_random_dict_14.txt, 10_random_dict_15.txt, 10_random_dict_16.txt, 10_random_dict_17.txt, 10_random_dict_18.txt, 10_random_dict_19.txt, 10_random_dict_20.txt, 10_random_dict_21.txt, 10_random_dict_22.txt, 10_random_dict_23.txt, 10_random_dict_24.txt, 10_random_dict_25.txt, 10_random_dict_26.txt, 10_random_dict_27.txt, 10_random_dict_28.txt, 10_random_dict_29.txt, 10_random_dict_30.txt, 10_random_dict_31.txt, 10_random_dict_32.txt, 10_random_dict_33.txt, 10_random_dict_34.txt, 10_random_dict_35.txt, 10_random_dict_36.txt, 10_random_dict_37.txt, 10_random_dict_38.txt, 10_random_dict_39.txt, 20_random_set_00.txt, 20_random_set_01.txt, 20_random_set_02.txt, 20_random_set_03.txt, 20_random_set_04.txt, 20_random_set_05.txt, 20_random_set_06.txt, 20_random_set_07.txt, 20_random_set_08.txt, 20_random_set_09.txt, 20_random_set_10.txt, 20_random_set_11.txt, 20_random_set_12.txt, 20_random_set_13.txt, 20_random_set_14.txt, 20_random_set_15.txt, 20_random_set_16.txt, 20_random_set_17.txt, 20_random_set_18.txt, 20_random_set_19.txt, 20_random_set_20.txt, 20_random_set_21.txt, 20_random_set_22.txt, 20_random_set_23.txt, 20_random_set_24.txt, 20_random_set_25.txt, 20_random_set_26.txt, 20_random_set_27.txt, 20_random_set_28.txt, 20_random_set_29.txt, 20_random_set_30.txt, 20_random_set_31.txt, 20_random_set_32.txt, 20_random_set_33.txt, 20_random_set_34.txt, 20_random_set_35.txt, 20_random_set_36.txt, 20_random_set_37.txt, 20_random_set_38.txt, 20_random_set_39.txt
Case Name Status Exec Time Memory
00_example_1.txt 22 ms 924 KB
00_example_2.txt 22 ms 928 KB
00_example_3.txt 23 ms 700 KB
00_large_00.txt 25 ms 808 KB
00_large_01.txt 25 ms 804 KB
00_small_00.txt 22 ms 800 KB
00_small_01.txt 24 ms 808 KB
00_small_02.txt 24 ms 676 KB
00_small_03.txt 22 ms 924 KB
00_small_04.txt 25 ms 928 KB
00_small_05.txt 22 ms 800 KB
00_small_08.txt 22 ms 800 KB
00_small_09.txt 23 ms 928 KB
00_small_10.txt 22 ms 804 KB
00_small_11.txt 23 ms 800 KB
00_small_12.txt 23 ms 804 KB
00_small_13.txt 24 ms 676 KB
00_small_15.txt 25 ms 800 KB
00_small_16.txt 25 ms 928 KB
00_small_17.txt 24 ms 804 KB
00_small_18.txt 24 ms 916 KB
00_small_20.txt 25 ms 804 KB
00_small_21.txt 25 ms 800 KB
00_small_22.txt 25 ms 928 KB
00_small_23.txt 25 ms 924 KB
10_random_dict_00.txt 23 ms 924 KB
10_random_dict_01.txt 23 ms 924 KB
10_random_dict_02.txt 24 ms 804 KB
10_random_dict_03.txt 25 ms 924 KB
10_random_dict_04.txt 26 ms 732 KB
10_random_dict_05.txt 26 ms 916 KB
10_random_dict_06.txt 26 ms 732 KB
10_random_dict_07.txt 23 ms 800 KB
10_random_dict_08.txt 23 ms 796 KB
10_random_dict_09.txt 23 ms 796 KB
10_random_dict_10.txt 23 ms 924 KB
10_random_dict_11.txt 23 ms 796 KB
10_random_dict_12.txt 23 ms 800 KB
10_random_dict_13.txt 24 ms 800 KB
10_random_dict_14.txt 23 ms 920 KB
10_random_dict_15.txt 23 ms 800 KB
10_random_dict_16.txt 23 ms 920 KB
10_random_dict_17.txt 23 ms 804 KB
10_random_dict_18.txt 23 ms 808 KB
10_random_dict_19.txt 23 ms 792 KB
10_random_dict_20.txt 23 ms 804 KB
10_random_dict_21.txt 24 ms 796 KB
10_random_dict_22.txt 23 ms 800 KB
10_random_dict_23.txt 23 ms 928 KB
10_random_dict_24.txt 23 ms 796 KB
10_random_dict_25.txt 23 ms 920 KB
10_random_dict_26.txt 23 ms 928 KB
10_random_dict_27.txt 23 ms 924 KB
10_random_dict_28.txt 23 ms 928 KB
10_random_dict_29.txt 23 ms 924 KB
10_random_dict_30.txt 23 ms 800 KB
10_random_dict_31.txt 23 ms 928 KB
10_random_dict_32.txt 23 ms 928 KB
10_random_dict_33.txt 23 ms 844 KB
10_random_dict_34.txt 25 ms 924 KB
10_random_dict_35.txt 26 ms 796 KB
10_random_dict_36.txt 24 ms 800 KB
10_random_dict_37.txt 24 ms 796 KB
10_random_dict_38.txt 23 ms 800 KB
10_random_dict_39.txt 23 ms 820 KB
20_random_set_00.txt 25 ms 804 KB
20_random_set_01.txt 25 ms 804 KB
20_random_set_02.txt 25 ms 808 KB
20_random_set_03.txt 24 ms 800 KB
20_random_set_04.txt 25 ms 920 KB
20_random_set_05.txt 25 ms 804 KB
20_random_set_06.txt 23 ms 928 KB
20_random_set_07.txt 25 ms 800 KB
20_random_set_08.txt 24 ms 928 KB
20_random_set_09.txt 25 ms 924 KB
20_random_set_10.txt 25 ms 800 KB
20_random_set_11.txt 25 ms 928 KB
20_random_set_12.txt 25 ms 924 KB
20_random_set_13.txt 25 ms 928 KB
20_random_set_14.txt 26 ms 804 KB
20_random_set_15.txt 26 ms 800 KB
20_random_set_16.txt 28 ms 804 KB
20_random_set_17.txt 25 ms 800 KB
20_random_set_18.txt 25 ms 804 KB
20_random_set_19.txt 25 ms 932 KB
20_random_set_20.txt 27 ms 776 KB
20_random_set_21.txt 23 ms 928 KB
20_random_set_22.txt 25 ms 796 KB
20_random_set_23.txt 27 ms 764 KB
20_random_set_24.txt 25 ms 928 KB
20_random_set_25.txt 24 ms 804 KB
20_random_set_26.txt 25 ms 796 KB
20_random_set_27.txt 25 ms 804 KB
20_random_set_28.txt 25 ms 800 KB
20_random_set_29.txt 25 ms 932 KB
20_random_set_30.txt 25 ms 928 KB
20_random_set_31.txt 27 ms 764 KB
20_random_set_32.txt 24 ms 924 KB
20_random_set_33.txt 25 ms 800 KB
20_random_set_34.txt 26 ms 912 KB
20_random_set_35.txt 24 ms 796 KB
20_random_set_36.txt 26 ms 916 KB
20_random_set_37.txt 25 ms 804 KB
20_random_set_38.txt 25 ms 808 KB
20_random_set_39.txt 25 ms 924 KB