prompt string | response string |
|---|---|
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<iostream>
using namespace std;
#define inRange(x,a,b) (a <= x && x <= b)
int main(){
string s;
cin >> s;
bool num = false, low = false, upp = false, len = s.length() >= 6;
for(char c : s){
num |= inRange(c, '0', '9');
low |= inRange(c, 'a', 'z');
upp |= inRange(c, 'A'... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | s=raw_input()
d=l=u=False
for c in s:
if c.isdigit(): d=True
if c.islower(): l=True
if c.isupper(): u=True
print 'VALID' if len(s)>=6 and d and l and u else 'INVALID' |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main () {
string passwd;
cin >> passwd;
bool dflg, uflg, lflg;
dflg = uflg = lflg = false;
unsigned size = passwd.size();
for (unsigned i = 0; i < size; i++) {
if (isdigit(passwd[i])) {
dflg = true;
}
if (isupper(passwd... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin(); it!=(c).end(); it++)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define pr(a) cout << (a) <<... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
bool a = false,b = false,c = false;
cin >> s;
for(int i=0;i<s.size();i++){
if(s[i] <= '9' && s[i] >= '0') a = true;
if(s[i] <= 'z' && s[i] >= 'a') b = true;
if(s[i] <= 'Z' && s[i] >= 'A') c = true;
}
if(s.size() ... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
bool res = 1, a = 0, b = 0, c = 0;
res &= (s.size() >= 6);
for (int i = 0; i < (int)s.size(); i++) {
a |= isdigit(s[i]);
b |= islower(s[i]);
c |= isupper(s[i]);
}
res &= a;
res &= b... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<iostream>
#include<string>
using namespace std;
int main(){
int n,bell=0,math=0,moji=0,MOJI=0;
string s;
cin >> s;
n=s.size();
if(n>=6){
bell++;
}
for(int i=0;i<n;i++){
if(s[i]>=48 && s[i]<=57){
math++;
}
else if(s[i]>=65 && s[i]<=90){
MOJI++;
}
else if(s[i]>=9... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | //Register Phase
#include <iostream>
using namespace std;
int main(){
char pass[21];
bool IsEnough = true;
bool ENum = false, ECap = false, ESml = false;
cin >> pass;
for (int i = 0; i < 21; ++i){
if (pass[i] == '\0'){
if (i < 6)IsEnough = false;
break;
} else{
if ('0' <= pass[i] && pass[i] <= '9')... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<iostream>
#include<string>
using namespace std;
int main(){
string inp;
bool f=false,f2=false,f3=false,f4=false;
cin>>inp;
for(int i=0;i<inp.size();i++){
if(inp[i]>='a'&&inp[i]<='z') f=true;
else if(inp[i]>='A'&&inp[i]<='Z') f2=true;
else if(inp[i]>='0'&&inp[i]<='9') f3=true;
}
if(inp.size()>... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<bits/stdc++.h>
using namespace std;
bool c, d, e;
int main() {
char a[20];
scanf("%s", a);
int b = strlen(a);
for (int i = 0; i < b; i++) {
if (a[i] >= '0'&&a[i] <= '9')c = true;
else if (a[i] >= 'a'&&a[i] <= 'z')d = true;
else if (a[i] >= 'A'&&a[i] <= 'Z')e = true;
}
if (b >= 6 && c&&d&&e)puts("V... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#includ... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<bits/stdc++.h>
using namespace std;
int main(){
string pass;
cin>>pass;
if(pass.size()<6){
cout<<"INVALID"<<endl;
return 0;
}
bool t=false;
for(int i=0;i<pass.size();++i){
if(pass[i]>='0' && pass[i]<='9'){
t=true;
break;
}
}
if(t==false){
cout<<"INVALID"<<endl;
return 0;
... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
while ((line = br.readLine()) != null && !lin... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
static int max;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String in = sc.next();
boolean ok = true;
boolean checkA = false;
boolean checkB = false;
boolean checkC = false;
if(in.length() < 6... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | p = input()
if len(p) < 6 or p.isalpha() or p.isdigit() or p.islower() or p.isupper():
print("INVALID")
else:
print("VALID")
|
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
string X;
cin>>X;
bool f1=false,f2=false,f3=false,f4=false;
if(X.size()>=6)f4=true;
for(int i=0;i<X.size();i++)
{
if(X[i]>='a'&&X[i]<='z')f1=true;
if(X[i]>='A'&&X[i]<='Z')f2=true;
if(X[i]>='0'&&X[i... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <iostream>
#include <cstdio>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#i... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | x=input()
if len(x)<6 or x.isalpha() or x.islower() or x.isupper() or x.isdigit():
print("INVALID")
else:
print("VALID")
|
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int a1=0,a2=0,a3=0;
for(int i=0;i<s.size();i++){
if(s[i]>='A'&&s[i]<='Z')a1++;
if(isdigit(s[i]))a2++;
if(s[i]>='a'&&s[i]<='z')a3++;
}
if(s.size()>=6&&a1&&a2&&a3)cout<<"VALID"<<endl;
else cout<<"INVALID"<<endl;
} |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define int long long
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
signed main(){
string s;
cin>>s;
bool f=0,g=0,h=0,k=0;
if(s.size()>=6) f... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | a = str(input())
if len(a) >= 6 and any(chr.isdigit() for chr in a) == True:
if any(chr.islower() for chr in a) == True and any(str.isupper() for str in a) == True:
print("VALID")
else:
print("INVALID")
else:
print("INVALID")
|
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <cctype>
#include <string>
#include <iostream>
using namespace std;
int main()
{
bool ok1 = false, ok2 = false, ok3 = false, ok4 = false; string S;
cin >> S;
ok1 = (S.size() >= 6);
for (int i = 0; i < S.size(); i++)
{
ok2 = ok2 | isdigit(S[i]);
ok3 = ok3 | isupper(S[i]);
ok4 = ok4 | islower(S[i... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
using namespace std;
typedef vector<int> VI;
typedef vector<vector<in... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #2522
l = []
word = input()
for i in word:
l.append(i)
a = 0
b = 0
c = 0
d = 0
if len(l) >= 6:
a += 1
for i in l:
if 48 <= ord(i) <= 57:
b += 1
elif 97 <= ord(i) <= 122:
c += 1
elif 65 <= ord(i) <= 90:
d += 1
else:
c += 0
if a >= 1 and b >= 1 and c >= 1... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | num = list("0123456789")
large = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
small = list("abcdefghijklmnopqrstuvwxyz")
S = input()
if len(S) < 6:
print("INVALID")
exit()
flag_n, flag_l, flag_s = False, False, False
for s in S:
if s in num:
flag_n = True
elif s in large:
flag_l = True
elif ... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include<iostream>
#include<string>
using namespace std;
int main(){
string a;
cin>>a;
bool t[4]={false};
if(a.size()>=6)t[0]=true;
for(int i=0;i<a.size();i++){
if(a[i]>='0'&&a[i]<='9')t[1]=true;
if(a[i]>='A'&&a[i]<='Z')t[2]=true;
if(a[i]>='a'&&a[i]<='z')t[3]=true;
}
if(t[0]+t[1]+t[2]+t[3]==4)cout<<"VALID"... |
Problem: It is important to use strong passwords to make the Internet more secure. At the same time, it is very important not to reuse the same password. No matter how strong your password is, if the plaintext is leaked in one place, it will be very easy to break. Of course, if all applications hash passwords and use S... | #include <iostream>
#include <string>
using namespace std;
int main(){
string pass;
cin >> pass;
int l = pass.length(), n = 0, A = 0, a = 0;
for(int i = 0; i < l; i++){
if(isdigit(pass[i]) != 0){
n = 1;
}
if(isupper(pass[i]) != 0){
A = 1;
}
if(islower(pass[i]) != 0){
a = 1;
}
}
if(l >= 6 a... |
Problem: Example
Input
10 2
2
1
Output
5 7
3 5
Solution (in CPP): | #include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>
using namespace ... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | //
// Writer: kurita
// states: AC
// O(N log(N))
//
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
#include<cstdio>
using namespace std;
typedef pair<int, int> pii;
typedef vector<vector<int> > Graph;
map<vector<int>, int> tree_hash;
vector<Graph> ConectedComponent(Graph &f) {
... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<c... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ull,ull> P;
#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... |
import java.io.*;
import java.util.*;
/**
* AIZU ONLINE JUDGE
* 2821 Trees in a Forest
*
* 2018/02/05
*/
public class Main {
class Tree {
List<P> list;
Tree() {
list = new ArrayList<P>();
}
@Override
public String toString() {
String s = Str... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | //
// Tree Isomorphism
//
// Description:
// Rooted trees (S,s) and (T,t) are isomorphic
// iff there is a bijection between childs of s and childs of t
// such that s.child[i] and t.child[pi[i]] is isomorphic.
//
// Two trees are isomorphic iff these are isomorphic with some roots.
//
// Algorithm:
// Aho-Ho... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <iostream>
#include <fstream>
#include <cassert>
#include <typeinfo>
#include <vector>
#include <stack>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#include <random>
#include <complex>
#define syos... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include "bits/stdc++.h"
using namespace std;
//int N,M,K,L,R,H,W;
long long int N,M,K,L,R,H,W;
constexpr long long int MOD=1000000007;
//constexpr int MOD=1000000007;
//constexpr int MOD=998244353;
//constexpr long long int MOD=998244353;
constexpr long double EPS=1e-8;
//
// Writer: kurita
// states: AC
// O(N ... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector< vector<int> > Graph;
int n[2],m[2];
map<string,int> mp;
vector<int> vp;
int cnt=1;
vector<Graph> Forest_to_Trees(Graph &G){
vector<int> num(n[0],-1);
vector<Graph> tree;
for(int i=0;i<n[0];i++){
if(num[i]=... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<c... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;
namespace tree {
void dfs(const int now, const vector<vector<int>>&edges, vector<int>&memo, int depth) {
memo[now] = depth;
for (auto e : edges[... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <iostream>
#include <fstream>
#include <cassert>
#include <typeinfo>
#include <vector>
#include <stack>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#include <random>
#include <complex>
#define syos... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline ... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <iostream>
#include <fstream>
#include <cassert>
#include <typeinfo>
#include <vector>
#include <stack>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#include <random>
#include <complex>
#define syos... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... |
import java.io.*;
import java.util.*;
/**
* AIZU ONLINE JUDGE
* 2821 Trees in a Forest
*
* 2018/02/05
*/
public class Main {
class Tree {
List<P> list;
Tree() {
list = new ArrayList<P>();
}
@Override
public String toString() {
String s = Str... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
using namespace std;
typedef vector< vector<int> > Graph;
typedef long long int ll;
Graph ginput(int n, int m) {
Graph G(n);
for(int i=0; i<m; i++) {
int s, t; cin >> s >> t;
s--; t--;
G[s].push_back(t);
G[t].push_back(s);
}
return G;
}
vector<G... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<c... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pa... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector< vector<int> > Graph;
int n[2],m[2];
map<string,int> mp;
vector<int> vp;
int cnt=1;
vector<Graph> Forest_to_Trees(Graph &G){
vector<int> num(n[0],-1);
vector<Graph> tree;
for(int i=0;i<n[0];i++){
if(num[i]=... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using usize = std::size_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
template <class T> void chmin(T &a... |
Problem: F: If you want to hide the trees, in the forest
story
"Wood is good" Chico, who runs the coffee shop "Turtle House", has an extraordinary love for trees. Everything seems to wash my heart with the immobility of wood. .. .. In order to confirm Chico-chan's love for trees, Kokoro-chan, who works part-time at t... | #include<iostream>
#include<vector>
#include<stack>
#include<algorithm>
#include<unordered_map>
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef vector< vector<int> > Graph;
class HashFunc{
public:
size_t operator()(const vector<int> &v) const {
size_t k = 1111, val = 0;
for(int x ... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <complex>
#include <string>
#include <algorithm>
#include <numeric>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <functi... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | #include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
constexpr Int bmds(Int x){
const Int v[] = {1012924417, 924844033, 998244353,
... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<pi, pi> pp;
typedef pair<ll, ll> pl;
const double EPS = 1e-9;
const ll MOD = 998244353;
const int inf = 1 << 30;
const ll linf = 1LL <<... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static final long MOD = 998244353;
public static void main(String[] args) {
char[] S = sc.next().toCharArray();
int N = S.length;
long[] pow3 = new long[N + 1];
pow3[0] = 1;
for (int i = 0; i < N; i++) {
pow3[i +... |
Problem: H: Revenge of UMG
problem
For the character string T consisting of three types of characters,'U',' M', and'G', the 1, 2, ..., | T | characters are T_1, T_2, ..., T_ {|, respectively. When we decide to express T |}, we call the number of pairs of (i, j, k) that satisfy the following conditions the "UMG number... | #ifndef CLASS_MODINT
#define CLASS_MODINT
#include <cstdint>
template<std::uint32_t mod>
class modint {
private:
std::uint32_t n;
public:
modint() : n(0) {};
modint(std::int64_t n_) : n((n_ >= 0 ? n_ : mod - (-n_) % mod) % mod) {};
static constexpr std::uint32_t get_mod() { return mod; }
std::uint32_t get() cons... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n;
cin >> n;
int res = 0;
while (n--) {
string s;
cin >> s;
res += s == "E869120";
}
cout << res << '\n';
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<bits/stdc++.h>
#define F first
#define S second
#define endl '\n'
#define lcm( a, b ) ((a)/__gcd(a,b)*(b))
#define MP make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
typedef pair<int, P> iP;
typedef pair< LL, LL > LP;
c... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
template<class T>
inline bool chmin(T &a, T b) {
if(a > b) {
... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)a, i##_len=(b); i<i##_len; i++)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define int long long
using namespace std;
using P = pair<int, int>;
using ll = long long;... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <stdio.h>
#include <ctype.h>
using namespace std;
#define pie 3.141592653589793238462643383279
#... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | import sys
input = sys.stdin.readline
N=int(input())
ANS=0
for i in range(N):
if input().strip()=="E869120":
ANS+=1
print(ANS)
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
using namespace std;
int n,c;
string s;
int main()
{
cin>>n;
for(int i=0;i<n;i++)cin>>s,c+=s=="E869120";
cout<<c<<endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int N;
cin >> N;
int ans = 0;
for (int i = 0; i < N; i++) {
string s;
cin >> s;
if (s == "E869120") {
ans++;
}
}
cout << ans << endl;
return 0;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include "bits/stdc++.h"
using namespace std;
using i64 = long long;
const i64 MOD = 1e9+7;
const i64 INF = 1e18+7;
template <typename T = i64>
bool chmax(T& a, T b){
if(a < b){
a = b;
return true;
}
return false;
}
template <typename T = i64>
bool chmin(T& a, T b){
if(a > b){
... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | n = int(input())
l = [input() for i in range(n)]
print(l.count('E869120'))
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define BITCNT(n) (__builtin_popc... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <queue>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <climits>
using namespace std;
#define MOD1097 1000000007
#define ll long long
#define pint pair<int, int>
#defin... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | N = int(input())
S = []
for _ in range(N):
S.append(input())
print(S.count('E869120'))
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <stack>
#include <vector>
#include <random>
#include <set>
#include <map>
#include <queue>
#include <bitset>
using namespace std;
typedef long long ll;
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)
int main(){
int n,ans=0;
c... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int a=0;
string s;
for(int i=0;i<n;i++){
cin>>s;
if(s=="E869120"){
a++;
}
}
cout<<a<<endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <algorithm>
#include<stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include<stack>
#include <queue>
#include<map>
#include <set>
#include<math.h>
using namespace std;
#define int long long
#define ll long long
#defin... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#define int long long
#define mod 1000000007
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
#define mp make_pair
using namespace std;
int a, b, c, d, n, ans;
int ar[234567];
string s... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
string a[N];
for(int i = 0; i < N; i++) cin>>a[i];
int ans = 0;
for(int i = 0; i < N; i++) {
if(a[i] == "E869120") ans++;
}
cout<<ans<<endl;
return 0;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005
int main() {
... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... |
import java.io.*;
import java.util.*;
/**
* AIZU ONLINE JUDGE
* 3126
* 2020/5/1
*/
public class Main {
boolean main() throws IOException {
Scanner sc = new Scanner(systemin);
int N = sc.nextInt();
sc.nextLine();
int cnt = 0;
for(int i = 0; i < N; i++) {
... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <string>
#include <cstring>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>
#include <fstream>
using namespace std;
#define REP(i, n) for(ll i = 0;i < n;i++)
#d... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int a[100005];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int ans = 0;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
if (s == "E869120")
ans++;
}
... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include "bits/stdc++.h"
using namespace std;
int main() {
int N; cin >> N;
vector<string>S(N);
int ans = 0;
for (int i = 0; i < N; i++) {
cin >> S.at(i);
if (S.at(i) == "E869120") ans++;
}
cout << ans << endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
signed main(){
int n;
cin >> n;
string s;
int... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | //
// main.cpp
// test130
//
// Created by on 2019/06/16.
// Copyright © 2 All rights reserved.
//
//
// main.cpp
// new
//
// Created on 2019/06/09.
// Copyright All rights reserved.
//
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This fi... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | N = int(input())
S = [input() for k in range(N)]
print(S.count("E869120"))
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<map>
#include<cassert>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
const int mod = 1000000007;
const int inf = 1ll << 61;
typedef pair<int, int> P;
typedef pair<int, P>PP;
signed main() {
int n; cin ... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
string str;
cin >> n;
cin.ignore();
int count = 0;
while (n--) {
cin >> str;
if (str == "E869120") count++;
}
cout << count << endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
#include<string>
using namespace std;
int main(){
int n,cnt=0;
string s;
cin >> n;
for(int i=0;i<n;i++){
cin >> s;
cnt += s=="E869120";
}
cout << cnt << endl;
return(0);
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
#define INF INT_MAX;
#define F first
#define S second
int main(){
int n;
int ans=0;
string s;
string e8="E869120";
scanf("%d",&n);
for(int i=0;i<n;i++){
cin>>s;
if(s==e8) ans++;
}
printf("%... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;
constexpr int INF = (1 << 30) - 1;
constexpr ll L... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | n=int(input())
s=[input() for _ in range(n)]
print(s.count("E869120"))
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
#include<iomanip>
#include<assert.h>
#inc... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for(int i = a; i < b; i++)
int main(){
int N; cin >> N;
vector<string> S(N);
rep(i, 0, N) cin >> S[i];
int cnt = 0;
rep(i, 0, N) if(S[i] == "E869120") cnt++;
cout << cnt << endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <algorithm>
#include <limits>
#include <vector>
#include <map>
#include <cmath>
#include <limits>
#include <iomanip>
#include <queue>
#include <string.h>
#include <bitset>
#define ll long long int
#define ld long double
#define rep(i,n) for(int i = 0;i < n;i++)
#define rep1(i,n) for(int i =... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include "bits/stdc++.h"
using namespace std;
#define lint long long
#define low lower_bound
#define upp upper_bound
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, n) for (int i = int(n); i >= 0; --i)
#define all(vec) (vec).begin(), (vec).end()
#define cend printf("\n");
#define prique(T) priority_qu... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | N = int(input())
S = [input() for _ in range(N)]
print(S.count('E869120'))
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <string>
#include <cmath>
#include <map>
#include <iomanip>
#include <tuple>
#define INF 1000000009
#define LINF 1000000000000000009
#define double long double
#define all(a) a.begin(),a.end()
using namespace std;
typede... |
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
int main() {
int N; cin >> N;
int ans = 0;
for (int i = 0; i < N; i++) {
string s; cin >> s;
if (s == "E869120") ans++;
}
cout << ans << endl;
return 0;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include<iostream>
using namespace std;
signed main(){
int n;
cin>>n;
int ans = 0;
while(n--){
string s;
cin>>s;
if(s=="E869120")ans++;
}
cout<< ans <<endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <iostream>
using namespace std;
int main()
{
int a;
int c = 0;
cin >> a;
string b[1000];
for (int i = 0; i < a; i++) {
cin >> b[i];
if (b[i] == "E869120") {
c++;
}
}
cout << c << endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include <bits/stdc++.h>
using namespace std;
int n,c;
string s[1234];
int main(){
cin>>n;
for(int i=0;i<n;i++){
cin>>s[i];
if(s[i]=="E869120")c++;
}
cout<<c<<endl;
}
|
Problem: Increasing E869120 (Ninja E869120)
E869120 You are good at alter ego.
Here are $ N $ members of the PA Lab. But some of them may be E869120.
So you asked all the $ N $ members of the PA Lab for their names. As a result, the $ N $ members named themselves $ S_1, S_2, S_3, \ dots, S_N $, respectively.
E86912... | #include "bits/stdc++.h"
using namespace std;
signed main()
{
ios::sync_with_stdio(false); cin.tie(nullptr);
int N; cin >> N;
int cnt = 0;
for (int i = 0; i < N; ++i) {
string s; cin >> s;
if (s == "E869120") ++cnt;
}
cout << cnt << endl;
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.