Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit143c297

Browse files
author
DENIS APOLINARIO DA SILVA
committed
Testes
1 parent30ad1c0 commit143c297

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

‎eclipse.ini‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
-startup
2+
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
3+
--launcher.library
4+
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
5+
-vm
6+
C:/ambienteDesenv/programas/java/jdk1.8.0_121/bin/javaw.exe
7+
-product
8+
org.eclipse.epp.package.jee.product
9+
--launcher.defaultAction
10+
openFile
11+
-showsplash
12+
org.eclipse.platform
13+
--launcher.defaultAction
14+
openFile
15+
--launcher.appendVmargs
16+
-vmargs
17+
-Xverify:none
18+
-Dosgi.requiredJavaVersion=1.8
19+
-Dosgi.locking=none
20+
-XX:+UseStringDeduplication
21+
-Xms512m
22+
-Xmx1024m
23+
-server
24+
-Dsun.lang.ClassLoader.allowArraySyntax=true
25+
26+
#-XX:MetaspaceSize=100m
27+
#-XX:MaxMetaspaceSize=256m
28+
#-XX:MinMetaspaceFreeRatio=0
29+
#-XX:MaxMetaspaceFreeRatio=100
30+
#-XX:ReservedCodeCacheSize=350M
31+
#-XX:+AlwaysPreTouch
32+
33+
#-XX:MetaspaceSize=100M to increase the initial size of Metaspaces (the default is 16M);
34+
#-XX:InitialBootClassLoaderMetaspaceSize=32M to increase the boot class loader Metaspace;
35+
#-XX:MinMetaspaceFreeRatio=50 to make Metaspaces grow more agressively;
36+
#-XX:MaxMetaspaceFreeRatio=80 to reduce the chance of Metaspaces shrinking;
37+
#-XX:MinMetaspaceExpansion=4M the minumum size by which a Metaspace is exanded;
38+
#-XX:MaxMetaspaceExpansion=16M the maximum size to expand a Metaspace by without Full GC.
39+
##-XX:+UseParallelGC
40+
##-XX:+UseG1GC
41+
#-XX:MinMetaspaceFreeRatio
42+
#-XX:MaxMetaspaceFreeRatio
43+
#-XX:PermSize=256m
44+
#-XX:MaxPermSize=256m

‎src/main/java/TesteSolution.java‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
importjava.util.Arrays;
2+
importjava.util.HashMap;
3+
importjava.util.List;
4+
importjava.util.Map;
5+
importjava.util.Scanner;
6+
7+
publicclassTesteSolution {
8+
publicstaticvoidmain(Stringargs[])throwsException {
9+
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
10+
Scannerin =newScanner(System.in);
11+
intN =in.nextInt();
12+
if (N ==0) {
13+
return;
14+
}
15+
Map<Integer,List<String>>composicoes =newHashMap<Integer,List<String>>(N);
16+
17+
intcontador =1;
18+
while (contador <=N) {
19+
if (!in.hasNext()) {
20+
return;
21+
}
22+
Stringcomposicao =in.next();
23+
composicoes.put(contador,Arrays.asList(composicao.split("")));
24+
25+
contador++;
26+
}
27+
28+
29+
contador =1;
30+
intresultado =1;
31+
intresultaodFinal =0;
32+
33+
34+
List<String>list =composicoes.get(contador);
35+
contador++;
36+
for (Stringletra :list) {
37+
System.out.println("letra " +contador +"-" +letra);
38+
while (contador <=composicoes.size()) {
39+
if (contemValor(letra,composicoes.get(contador))) {
40+
resultado ++;
41+
}
42+
contador++;
43+
}
44+
if(resultado ==N){
45+
resultaodFinal ++;
46+
}
47+
contador =2;
48+
resultado =1;
49+
}
50+
System.out.println(resultaodFinal);
51+
}
52+
53+
privatestaticbooleancontemValor(Stringletra,List<String>listas) {
54+
returnlistas.contains(letra);
55+
}
56+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp