node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 41, 13, 17, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 13, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 13, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 13, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 17, 30, 0, 13, 13, 0, 13, 17, 0, 13, 17, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 167, 14 ], [ 167, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 17, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 17, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 50, 52 ], [ 17, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 17, 61 ], [ 61, 62 ], [ 61, 63 ], [ 17, 64 ], [ 64, 65 ], [ 64, 66 ], [ 17, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 79, 80 ], [ 79, 81 ], [ 67, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 87, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 17, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 100, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 17, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 132, 133 ], [ 132, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 139, 141 ], [ 127, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 147, 148 ], [ 147, 149 ], [ 142, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 154, 155 ], [ 154, 156 ], [ 150, 157 ], [ 157, 158 ], [ 157, 159 ], [ 17, 160 ], [ 160, 161 ], [ 161, 162 ], [ 160, 163 ], [ 15, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.io.*;\nimport java.util.*;\nimport static java.lang.System.*;\nimport static java.lang.Math.*;\n\npublic class Main\n{\t\n\tpublic static void main(String []args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}\n\t\n\t\n}\n\n", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import static java.lang.System.*;", "import static java.lang.System.*;", "import static java.lang.System.*;", "import static java.lang.Math.*;", "import static java.lang.Math.*;", "import static java.lang.Math.*;", "public class Main\n{\t\n\tpublic static void main(String []args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}\n\t\n\t\n}", "Main", "public static void main(String []args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}", "main", "{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String []s=br.readLine().split(\" \");", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "long A=Long.parseLong(s[0]);", "A", "Long.parseLong(s[0])", "Long.parseLong", "Long", "s[0]", "s", "0", "long B=Long.parseLong(s[1]);", "B", "Long.parseLong(s[1])", "Long.parseLong", "Long", "s[1]", "s", "1", "long C=Long.parseLong(s[2]);", "C", "Long.parseLong(s[2])", "Long.parseLong", "Long", "s[2]", "s", "2", "long K=Long.parseLong(s[3]);", "K", "Long.parseLong(s[3])", "Long.parseLong", "Long", "s[3]", "s", "3", "long sum=0;", "sum", "0", "boolean flag=true;", "flag", "true", "if(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}", "K>A && flag==true", "K>A", "K", "A", "flag==true", "flag", "true", "{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}", "K-=A", "K", "A", "sum+=A", "sum", "A", "if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}", "K<=A && flag==true", "K<=A", "K", "A", "flag==true", "flag", "true", "{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}", "sum+=K", "sum", "K", "K=0", "K", "0", "flag=false", "flag", "false", "if(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K>B && flag==true", "K>B", "K", "B", "flag==true", "flag", "true", "{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}", "K-=B", "K", "B", "if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K<=B && flag==true", "K<=B", "K", "B", "flag==true", "flag", "true", "{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K=0", "K", "0", "flag=false", "flag", "false", "if(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K>C && flag==true", "K>C", "K", "C", "flag==true", "flag", "true", "{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K-=C", "K", "C", "sum-=C", "sum", "C", "if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "K<=C && flag==true", "K<=C", "K", "C", "flag==true", "flag", "true", "{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}", "sum-=K", "sum", "K", "K=0", "K", "0", "flag=false", "flag", "false", "out.println(sum)", "out.println", "out", "sum", "String []args", "args", "public class Main\n{\t\n\tpublic static void main(String []args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}\n\t\n\t\n}", "public class Main\n{\t\n\tpublic static void main(String []args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\t//long X=Long.parseLong(br.readLine());\n\t\tString []s=br.readLine().split(\" \");\n\t\tlong A=Long.parseLong(s[0]);\n\t\tlong B=Long.parseLong(s[1]);\n\t\tlong C=Long.parseLong(s[2]);\n\t\tlong K=Long.parseLong(s[3]);\n\t\t\n\t\tlong sum=0;\n\t\tboolean flag=true;\n\t\t\n\t\tif(K>A && flag==true)\n\t\t{\n\t\t\tK-=A;\n\t\t\tsum+=A;\n\t\t\t//out.println(\"if A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\telse if(K<=A && flag==true)\n\t\t{\n\t\t\tsum+=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif A K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\n\t\tif(K>B && flag==true)\n\t\t{\n\t\t\tK-=B;\n\t\t\t//out.println(\"if B K=\"+ K+\" sum=\"+sum);\n\t\t}\n\t\t\t\n\t\telse if(K<=B && flag==true)\n\t\t{\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif B K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\tif(K>C && flag==true)\n\t\t{\n\t\t\tK-=C;\n\t\t\tsum-=C;\n\t\t\t//out.println(\"if C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\telse if(K<=C && flag==true)\n\t\t{\n\t\t\tsum-=K;\n\t\t\tK=0;\n\t\t\tflag=false;\n\t\t\t//out.println(\"elif C K=\"+ K+\" sum=\"+sum);\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//ans = flag==true? \"Yes\" : \"No\";\n\t\t\t\n\t\tout.println(sum);\n\t\t\n\t}\n\t\n\t\n}", "Main" ]
import java.io.*; import java.util.*; import static java.lang.System.*; import static java.lang.Math.*; public class Main { public static void main(String []args)throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); //long X=Long.parseLong(br.readLine()); String []s=br.readLine().split(" "); long A=Long.parseLong(s[0]); long B=Long.parseLong(s[1]); long C=Long.parseLong(s[2]); long K=Long.parseLong(s[3]); long sum=0; boolean flag=true; if(K>A && flag==true) { K-=A; sum+=A; //out.println("if A K="+ K+" sum="+sum); } else if(K<=A && flag==true) { sum+=K; K=0; flag=false; //out.println("elif A K="+ K+" sum="+sum); } if(K>B && flag==true) { K-=B; //out.println("if B K="+ K+" sum="+sum); } else if(K<=B && flag==true) { K=0; flag=false; //out.println("elif B K="+ K+" sum="+sum); } if(K>C && flag==true) { K-=C; sum-=C; //out.println("if C K="+ K+" sum="+sum); } else if(K<=C && flag==true) { sum-=K; K=0; flag=false; //out.println("elif C K="+ K+" sum="+sum); } //ans = flag==true? "Yes" : "No"; out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 11, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 11, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 43, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 9, 73 ], [ 73, 74 ] ]
[ "import java.util.*;\n\nclass Main {\n static Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n }\n}", "import java.util.*;", "util.*", "java", "class Main {\n static Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n }\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n }", "main", "{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n }", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }", "k <= a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (k > a && k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }", "k > a && k <= a + b", "k > a", "k", "a", "k <= a + b", "k", "a + b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(a - (k - a - b));\n }", "System.out.println(a - (k - a - b))", "System.out.println", "System.out", "System", "System.out", "a - (k - a - b)", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "String[] args", "args" ]
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); if (k <= a) { System.out.println(k); } else if (k > a && k <= a + b) { System.out.println(a); } else { System.out.println(a - (k - a - b)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 2, 2, 13, 13, 13, 30, 0, 13, 13, 30, 41, 13, 2, 2, 13, 13, 13, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 43, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 61, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 57, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}\n}", "Main", "public static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}", "main", "{\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int result = 0;", "result", "0", "if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }", "k<a", "k", "a", "{\n\t \tresult = k;\n\t }", "result = k", "result", "k", "if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }", "k>=a && a+b>=k", "k>=a", "k", "a", "a+b>=k", "a+b", "a", "b", "k", "{\n\t \tresult = a;\n\t }", "result = a", "result", "a", "{\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }", "int d = k-a-b;", "d", "k-a-b", "k-a-b", "k", "a", "b", "result = a-d", "result", "a-d", "a", "d", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public class Main {\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}\n}", "public class Main {\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t int a = sc.nextInt();\n\t int b = sc.nextInt();\n\t int c = sc.nextInt();\n\t int k = sc.nextInt();\n\t \n\t int result = 0;\n\t if(k<a) {\n\t \tresult = k;\n\t }else if(k>=a && a+b>=k) {\n\t \tresult = a;\n\t }else {\n\t \tint d = k-a-b;\n\t \tresult = a-d;\n\t }\n\t System.out.println(result); \n\t \n \n\n \n\t \n //System.out.println(res); \n\t \n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int result = 0; if(k<a) { result = k; }else if(k>=a && a+b>=k) { result = a; }else { int d = k-a-b; result = a-d; } System.out.println(result); //System.out.println(res); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 70, 5 ], [ 70, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 43, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 8, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 6, 67 ], [ 67, 68 ], [ 0, 69 ], [ 69, 70 ], [ 69, 71 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int score = 0;", "score", "0", "if (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}", "k < a", "k", "a", "{\n\t\t\tscore = k;\n\t\t}", "score = k", "score", "k", "{\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}", "score = a", "score", "a", "k -= a", "k", "a", "if (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}", "k > b", "k", "b", "{ // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}", "k -= b", "k", "b", "score -= k", "score", "k", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint score = 0;\n\t\tif (k < a) {\n\t\t\tscore = k;\n\t\t} else {\n\t\t\tscore = a;\n\t\t\tk -= a;\n\t\t\tif (k > b) { // k <= b, do nothing, too.\n\t\t\t\tk -= b;\n\t\t\t\tscore -= k;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int score = 0; if (k < a) { score = k; } else { score = a; k -= a; if (k > b) { // k <= b, do nothing, too. k -= b; score -= k; } } System.out.println(score); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 29, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 30, 4, 18, 18, 13, 13, 13, 29, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 39, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 52, 59 ], [ 35, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 60, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 75, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 85, 92 ], [ 71, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 93, 100 ], [ 8, 101 ], [ 101, 102 ], [ 101, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 6, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int a = scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "int b = scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "int c = scanner.nextInt();", "c", "scanner.nextInt()", "scanner.nextInt", "scanner", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "int sum = 0;", "sum", "0", "if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }", "a <= k", "a", "k", "{\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }", "sum += a", "sum", "a", "k = k - a", "k", "k - a", "k", "a", "if(k == 0){\n System.out.println(sum);\n return;\n }", "k == 0", "k", "0", "{\n System.out.println(sum);\n return;\n }", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "{\n sum += k;\n System.out.println(sum);\n return;\n }", "sum += k", "sum", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }", "b <= k", "b", "k", "{\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }", "k = k - b", "k", "k - b", "k", "b", "if(k == 0){\n System.out.println(sum);\n return;\n }", "k == 0", "k", "0", "{\n System.out.println(sum);\n return;\n }", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "{\n System.out.println(sum);\n return;\n }", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "sum -= k", "sum", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int sum = 0;\n\n if(a <= k){\n sum += a;\n k = k - a;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n sum += k;\n System.out.println(sum);\n return;\n }\n\n if(b <= k){\n k = k - b;\n if(k == 0){\n System.out.println(sum);\n return;\n }\n }else{\n System.out.println(sum);\n return;\n }\n\n sum -= k;\n System.out.println(sum);\n\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int k = scanner.nextInt(); int sum = 0; if(a <= k){ sum += a; k = k - a; if(k == 0){ System.out.println(sum); return; } }else{ sum += k; System.out.println(sum); return; } if(b <= k){ k = k - b; if(k == 0){ System.out.println(sum); return; } }else{ System.out.println(sum); return; } sum -= k; System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 42, 2, 13, 17, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 14, 2, 13, 17, 30, 29, 13, 0, 13, 2, 13, 13, 42, 2, 13, 17, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 29, 13, 23, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 37, 40 ], [ 37, 41 ], [ 37, 42 ], [ 6, 43 ], [ 43, 44 ], [ 109, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 55, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 55, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 55, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 47, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 47, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 87, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 47, 98 ], [ 98, 99 ], [ 45, 100 ], [ 100, 101 ], [ 45, 102 ], [ 102, 103 ], [ 45, 104 ], [ 104, 105 ], [ 45, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}\n\n\tpublic static long Ret(long a, long b, long c, long k) {\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}\n\n\tpublic static long Ret(long a, long b, long c, long k) {\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}", "main", "{\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}", "@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);", "scn", "new Scanner(System.in)", "long a = scn.nextLong();", "a", "scn.nextLong()", "scn.nextLong", "scn", "long b = scn.nextLong();", "b", "scn.nextLong()", "scn.nextLong", "scn", "long c = scn.nextLong();", "c", "scn.nextLong()", "scn.nextLong", "scn", "long k = scn.nextLong();", "k", "scn.nextLong()", "scn.nextLong", "scn", "System.out.println(Ret(a, b, c, k))", "System.out.println", "System.out", "System", "System.out", "Ret(a, b, c, k)", "Ret", "a", "b", "c", "k", "String[] args", "args", "public static long Ret(long a, long b, long c, long k) {\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}", "Ret", "{\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}", "long ans = 0;", "ans", "0", "while (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}", "a != 0", "a", "0", "{\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}", "ans = ans + 1", "ans", "ans + 1", "ans", "1", "k = k - 1", "k", "k - 1", "k", "1", "a = a - 1", "a", "a - 1", "a", "1", "if (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}", "k <= 0", "k", "0", "{\n\t\t\t\treturn ans;\n\t\t\t}", "return ans;", "ans", "k = k - b", "k", "k - b", "k", "b", "while (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}", "k > 0", "k", "0", "{\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}", "ans = ans - 1", "ans", "ans - 1", "ans", "1", "k = k - 1", "k", "k - 1", "k", "1", "return ans;", "ans", "long a", "a", "long b", "b", "long c", "c", "long k", "k", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}\n\n\tpublic static long Ret(long a, long b, long c, long k) {\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scn = new Scanner(System.in);\n\t\tlong a = scn.nextLong();\n\t\tlong b = scn.nextLong();\n\t\tlong c = scn.nextLong();\n\t\tlong k = scn.nextLong();\n\t\tSystem.out.println(Ret(a, b, c, k));\n\t}\n\n\tpublic static long Ret(long a, long b, long c, long k) {\n\t\tlong ans = 0;\n\t\twhile (a != 0) {\n\t\t\tans = ans + 1;\n\t\t\tk = k - 1;\n\t\t\ta = a - 1;\n\t\t\tif (k <= 0) {\n\t\t\t\treturn ans;\n\t\t\t}\n\t\t}\n\t\tk = k - b;\n\t\twhile (k > 0) {\n\t\t\tans = ans - 1;\n\t\t\tk = k - 1;\n\t\t}\n\t\treturn ans;\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { @SuppressWarnings("resource") Scanner scn = new Scanner(System.in); long a = scn.nextLong(); long b = scn.nextLong(); long c = scn.nextLong(); long k = scn.nextLong(); System.out.println(Ret(a, b, c, k)); } public static long Ret(long a, long b, long c, long k) { long ans = 0; while (a != 0) { ans = ans + 1; k = k - 1; a = a - 1; if (k <= 0) { return ans; } } k = k - b; while (k > 0) { ans = ans - 1; k = k - 1; } return ans; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 17, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 17, 30, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 17, 14, 2, 13, 17, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 41, 13, 17, 42, 13, 30, 4, 13, 38, 5, 13, 30, 37, 20, 30, 4, 18, 13, 17, 14, 2, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 18, 13, 13, 17, 30, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 274, 8 ], [ 274, 9 ], [ 9, 10 ], [ 274, 11 ], [ 11, 12 ], [ 11, 13 ], [ 274, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 16, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 16, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 16, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 16, 33 ], [ 33, 34 ], [ 33, 35 ], [ 16, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 44, 46 ], [ 36, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 16, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 16, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 16, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 274, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 87, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 102, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 87, 112 ], [ 112, 113 ], [ 112, 114 ], [ 87, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 120, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 132, 136 ], [ 131, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 137, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 131, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 85, 151 ], [ 151, 152 ], [ 274, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 156, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 166, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 155, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 274, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 187, 188 ], [ 274, 189 ], [ 189, 190 ], [ 189, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 193, 196 ], [ 196, 197 ], [ 274, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 202, 205 ], [ 205, 206 ], [ 274, 207 ], [ 207, 208 ], [ 207, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 209, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 214, 219 ], [ 219, 220 ], [ 219, 221 ], [ 214, 222 ], [ 222, 223 ], [ 223, 224 ], [ 214, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 226, 230 ], [ 230, 231 ], [ 209, 232 ], [ 232, 233 ], [ 207, 234 ], [ 234, 235 ], [ 274, 236 ], [ 236, 237 ], [ 236, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 274, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 246, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 253, 255 ], [ 251, 256 ], [ 256, 257 ], [ 256, 258 ], [ 251, 259 ], [ 259, 260 ], [ 260, 261 ], [ 251, 262 ], [ 262, 263 ], [ 263, 264 ], [ 264, 265 ], [ 264, 266 ], [ 263, 267 ], [ 267, 268 ], [ 246, 269 ], [ 269, 270 ], [ 244, 271 ], [ 271, 272 ], [ 0, 273 ], [ 273, 274 ], [ 273, 275 ] ]
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}", "Main", "//Switch input source (stdin/file)\n\tprivate static BufferedReader br;", "br", "//Input read utility\n\tprivate static StringTokenizer tokenizer = null;", "tokenizer", "null", "private static void solve(){\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}", "solve", "{\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}", "int A = ni();", "A", "ni()", "ni", "int B = ni();", "B", "ni()", "ni", "int C = ni();", "C", "ni()", "ni", "int K = ni();", "K", "ni()", "ni", "int result = 0;", "result", "0", "if(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}", "K <= A", "K", "A", "{\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t}", "result += K", "result", "K", "K = 0", "K", "0", "{\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}", "result += A", "result", "A", "K -= A", "K", "A", "if(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}", "K > 0", "K", "0", "{\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}", "if(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}", "K <= B", "K", "B", "{\n\t\t\t\tK = 0;\n\t\t\t}", "K = 0", "K", "0", "{\n\t\t\t\tK -= B;\n\t\t\t}", "K -= B", "K", "B", "if(K > 0) {\n\t\t\tresult -= K;\n\t\t}", "K > 0", "K", "0", "{\n\t\t\tresult -= K;\n\t\t}", "result -= K", "result", "K", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "public static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}", "main", "{\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String debugDataPath = System.getenv(\"DD_PATH\");", "debugDataPath", "System.getenv(\"DD_PATH\")", "System.getenv", "System", "\"DD_PATH\"", "if(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "debugDataPath != null", "debugDataPath", "null", "{\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "try{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "Exception e", "{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}", "br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))))", "br", "new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))))", "boolean hasNext = true;", "hasNext", "true", "while(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}", "hasNext", "{\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}", "solve()", "solve", "try{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "Exception e", "{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}", "br.mark(1)", "br.mark", "br", "1", "if(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}", "br.read() > 0", "br.read()", "br.read", "br", "0", "{\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t}", "br.reset()", "br.reset", "br", "System.out.println(\"---\")", "System.out.println", "System.out", "System", "System.out", "\"---\"", "{\n\t\t\t\t\thasNext = false;\n\t\t\t\t}", "hasNext = false", "hasNext", "false", "String[] args", "args", "public static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}", "next", "{\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "try {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "Exception e", "{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t}", "tokenizer = new StringTokenizer(br.readLine())", "tokenizer", "new StringTokenizer(br.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}", "ni", "{\n\t\treturn Integer.parseInt(next());\n\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}", "nl", "{\n\t\treturn Long.parseLong(next());\n\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}", "nd", "{\n\t\treturn Double.parseDouble(next());\n\t}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "na", "{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = ni();", "a[i] = ni()", "a[i]", "a", "i", "ni()", "ni", "return a;", "a", "int n", "n", "//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}", "ns", "{\n\t\treturn next().toCharArray();\n\t}", "return next().toCharArray();", "next().toCharArray()", "next().toCharArray", "next()", "next", "//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}", "nal", "{\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nl();", "a[i] = nl()", "a[i]", "a", "i", "nl()", "nl", "return a;", "a", "int n", "n", "public class Main {\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}", "public class Main {\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint A = ni();\n\t\tint B = ni();\n\t\tint C = ni();\n\t\tint K = ni();\n\t\tint result = 0;\n\t\tif(K <= A) {\n\t\t\tresult += K;\n\t\t\tK = 0;\n\t\t} else {\n\t\t\tresult += A;\n\t\t\tK -= A;\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tif(K <= B) {\n\t\t\t\tK = 0;\n\t\t\t} else {\n\t\t\t\tK -= B;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(K > 0) {\n\t\t\tresult -= K;\n\t\t}\n\t\t\n\t\tSystem.out.println(result);\n\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { private static void solve(){ //Implement solution here. int A = ni(); int B = ni(); int C = ni(); int K = ni(); int result = 0; if(K <= A) { result += K; K = 0; } else { result += A; K -= A; } if(K > 0) { if(K <= B) { K = 0; } else { K -= B; } } if(K > 0) { result -= K; } System.out.println(result); } //Switch input source (stdin/file) private static BufferedReader br; public static void main(String[] args){ br = new BufferedReader(new InputStreamReader(System.in)); String debugDataPath = System.getenv("DD_PATH"); if(debugDataPath != null){ try{ br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath)))); }catch(Exception e){ throw new RuntimeException(e); } } boolean hasNext = true; while(hasNext){ solve(); try{ br.mark(1); if(br.read() > 0){ br.reset(); System.out.println("---"); } else { hasNext = false; } }catch(Exception e){ throw new RuntimeException(e); } } } //Input read utility private static StringTokenizer tokenizer = null; public static String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(br.readLine()); } catch (Exception e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } //Get next single int private static int ni() { return Integer.parseInt(next()); } //Get next single long private static long nl() { return Long.parseLong(next()); } //Get next single double private static double nd() { return Double.parseDouble(next()); } //Get next int array from one line private static int[] na(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = ni(); return a; } //Get next char array from one line private static char[] ns() { return next().toCharArray(); } //Get next long array from one line private static long[] nal(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nl(); return a; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 96, 5 ], [ 96, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 47, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 56, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 65, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 71, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 8, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 6, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(final String args[]) {\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(final String args[]) {\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(final String args[]) {\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int A = scan.nextInt();", "A", "scan.nextInt()", "scan.nextInt", "scan", "int B = scan.nextInt();", "B", "scan.nextInt()", "scan.nextInt", "scan", "int C = scan.nextInt();", "C", "scan.nextInt()", "scan.nextInt", "scan", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }", "A >= K", "A", "K", "{\n sum = K;\n }", "sum = K", "sum", "K", "if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }", "A < K", "A", "K", "{\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }", "sum = A", "sum", "A", "K = K - A", "K", "K - A", "K", "A", "if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }", "B >= K", "B", "K", "{\n \n }", "if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }", "B < K", "B", "K", "{\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }", "K = K - B", "K", "K - B", "K", "B", "if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }", "C >= K", "C", "K", "{\n sum = sum - K;\n }", "sum = sum - K", "sum", "sum - K", "sum", "K", "{\n sum = sum - C;\n }", "sum = sum - C", "sum", "sum - C", "sum", "C", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "final String args[]", "args", "public class Main {\n public static void main(final String args[]) {\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }\n}", "public class Main {\n public static void main(final String args[]) {\n Scanner scan = new Scanner(System.in);\n int A = scan.nextInt();\n int B = scan.nextInt();\n int C = scan.nextInt();\n int K = scan.nextInt();\n int sum = 0;\n if(A >= K){\n sum = K;\n }else if(A < K){\n sum = A;\n K = K - A;\n if(B >= K){\n \n }else if(B < K){\n //sum = sum + B;\n K = K - B;\n if(C >= K){\n sum = sum - K;\n }else{\n sum = sum - C;\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(final String args[]) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); int C = scan.nextInt(); int K = scan.nextInt(); int sum = 0; if(A >= K){ sum = K; }else if(A < K){ sum = A; K = K - A; if(B >= K){ }else if(B < K){ //sum = sum + B; K = K - B; if(C >= K){ sum = sum - K; }else{ sum = sum - C; } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 3, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 3, 0, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 3, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 129, 5 ], [ 129, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 50, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 50, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 79, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 8, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 91, 99 ], [ 99, 100 ], [ 100, 101 ], [ 91, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 103, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 8, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 6, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String args[]){\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String args[]){\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }\n}", "Main", "public static void main(String args[]){\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }", "main", "{\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }", "Scanner sn = new Scanner(System.in);", "sn", "new Scanner(System.in)", "int A = sn.nextInt();", "A", "sn.nextInt()", "sn.nextInt", "sn", "int B = sn.nextInt();", "B", "sn.nextInt()", "sn.nextInt", "sn", "int C = sn.nextInt();", "C", "sn.nextInt()", "sn.nextInt", "sn", "int K = sn.nextInt();", "K", "sn.nextInt()", "sn.nextInt", "sn", "int flag = 1;", "flag", "1", "int ans = 0;", "ans", "0", "for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<A", "i", "A", "i++", "i++", "i", "{\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }", "{\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }", "if(K == 0) {\n break;\n }", "K == 0", "K", "0", "{\n break;\n }", "break;", "ans = ans + 1", "ans", "ans + 1", "ans", "1", "K = K - 1", "K", "K - 1", "K", "1", "for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<B", "i", "B", "i++", "i++", "i", "{\n if(K == 0) {\n break;\n }\n K = K - 1;\n }", "{\n if(K == 0) {\n break;\n }\n K = K - 1;\n }", "if(K == 0) {\n break;\n }", "K == 0", "K", "0", "{\n break;\n }", "break;", "K = K - 1", "K", "K - 1", "K", "1", "for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<C", "i", "C", "i++", "i++", "i", "{\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }", "{\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }", "if(K == 0) {\n break;\n }", "K == 0", "K", "0", "{\n break;\n }", "break;", "ans = ans - 1", "ans", "ans - 1", "ans", "1", "K = K - 1", "K", "K - 1", "K", "1", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String args[]", "args", "public class Main{\n public static void main(String args[]){\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }\n}", "public class Main{\n public static void main(String args[]){\n Scanner sn = new Scanner(System.in);\n int A = sn.nextInt();\n int B = sn.nextInt();\n int C = sn.nextInt();\n int K = sn.nextInt();\n int flag = 1;\n int ans = 0;\n\n for(int i=0; i<A; i++){\n if(K == 0) {\n break;\n }\n ans = ans + 1;\n K = K - 1;\n }\n\n for(int i=0; i<B; i++){\n if(K == 0) {\n break;\n }\n K = K - 1;\n }\n\n for(int i=0; i<C; i++){\n if(K == 0) {\n break;\n }\n ans = ans - 1;\n K = K - 1;\n }\n\n System.out.println(ans);\n\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sn = new Scanner(System.in); int A = sn.nextInt(); int B = sn.nextInt(); int C = sn.nextInt(); int K = sn.nextInt(); int flag = 1; int ans = 0; for(int i=0; i<A; i++){ if(K == 0) { break; } ans = ans + 1; K = K - 1; } for(int i=0; i<B; i++){ if(K == 0) { break; } K = K - 1; } for(int i=0; i<C; i++){ if(K == 0) { break; } ans = ans - 1; K = K - 1; } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 17, 41, 13, 18, 13, 17, 41, 13, 18, 13, 17, 41, 13, 18, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 115, 5 ], [ 115, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 27, 37 ], [ 37, 38 ], [ 38, 39 ], [ 27, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 8, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 8, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 83, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 83, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 100, 100 ], [ 100, 101 ], [ 100, 102 ], [ 100, 103 ], [ 96, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 109, 110 ], [ 109, 111 ], [ 6, 112 ], [ 112, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "//package Beg_167;\nimport java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}", "main", "{\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}", "Scanner t = new Scanner(System.in);", "t", "new Scanner(System.in)", "String p = t.nextLine();", "p", "t.nextLine()", "t.nextLine", "t", "String[] l = p.split(\" \");", "l", "p.split(\" \")", "p.split", "p", "\" \"", "long [] list=new long[4];", "list", "new long[4]", "4", "for (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<l.length", "i", "l.length", "l", "l.length", "i++", "i++", "i", "{\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}", "{\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}", "list[i]=Long.parseLong(l[i])", "list[i]", "list", "i", "Long.parseLong(l[i])", "Long.parseLong", "Long", "l[i]", "l", "i", "long a = list[0];", "a", "list[0]", "list", "0", "long b=list[1];", "b", "list[1]", "list", "1", "long c=list[2];", "c", "list[2]", "list", "2", "long k=list[3];", "k", "list[3]", "list", "3", "if (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}", "a>=k", "a", "k", "{\n\t\t\tSystem.out.println(k);\n\t\t}", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}", "(a+b)>k", "(a+b)", "a", "b", "k", "{\n\t\t\tSystem.out.println(a);\n\t\t}", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}", "long q = k-a-b;", "q", "k-a-b", "k-a-b", "k", "a", "b", "System.out.println(a-q)", "System.out.println", "System.out", "System", "System.out", "a-q", "a", "q", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tString p = t.nextLine();\n\t\tString[] l = p.split(\" \");\n\t\tlong [] list=new long[4];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Long.parseLong(l[i]);\n\t\t\t\n\t\t}\n\t\tlong a = list[0];\n\t\tlong b=list[1];\n\t\tlong c=list[2];\n\t\tlong k=list[3];\n\t\t\n\t\tif (a>=k) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if ((a+b)>k) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tlong q = k-a-b;\n\t\t\tSystem.out.println(a-q);\n\t\t}\n\t}\n}", "Main" ]
//package Beg_167; import java.util.*; public class Main{ public static void main(String[] args) { Scanner t = new Scanner(System.in); String p = t.nextLine(); String[] l = p.split(" "); long [] list=new long[4]; for (int i=0;i<l.length;i++) { list[i]=Long.parseLong(l[i]); } long a = list[0]; long b=list[1]; long c=list[2]; long k=list[3]; if (a>=k) { System.out.println(k); } else if ((a+b)>k) { System.out.println(a); } else { long q = k-a-b; System.out.println(a-q); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 2, 13, 13, 2, 13, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 43, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 70, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 60, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 8, 87 ], [ 87, 88 ], [ 88, 89 ], [ 6, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String args[]){\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }\n }", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String args[]){\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }\n }", "Main", "public static void main(String args[]){\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }", "main", "{\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n }", "k <= a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n }", "k > a && k <= a + b", "k > a", "k", "a", "k <= a + b", "k", "a + b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n }", "k > a + b && k <= a + b + c", "k > a + b", "k", "a + b", "a", "b", "k <= a + b + c", "k", "a + b + c", "a + b + c", "a", "b", "c", "{\n System.out.println(a- (k-a-b));\n }", "System.out.println(a- (k-a-b))", "System.out.println", "System.out", "System", "System.out", "a- (k-a-b)", "a", "(k-a-b)", "k-a-b", "k", "a", "b", "scan.close()", "scan.close", "scan", "String args[]", "args", "public class Main{\n public static void main(String args[]){\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }\n }", "public class Main{\n public static void main(String args[]){\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n \n \n if (k <= a) {\n System.out.println(k);\n } else if (k > a && k <= a + b) {\n System.out.println(a);\n } else if (k > a + b && k <= a + b + c) {\n System.out.println(a- (k-a-b));\n } \n \n \n\n\n scan.close();\n }\n }", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = scan.nextInt(); if (k <= a) { System.out.println(k); } else if (k > a && k <= a + b) { System.out.println(a); } else if (k > a + b && k <= a + b + c) { System.out.println(a- (k-a-b)); } scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 4, 18, 13, 13, 14, 2, 13, 2, 13, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 2, 2, 13, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 30, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 37, 20, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 4, 18, 13, 13, 29, 4, 13, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 6, 13, 12, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 305, 23 ], [ 305, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 29, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 26, 40 ], [ 40, 41 ], [ 40, 42 ], [ 26, 43 ], [ 43, 44 ], [ 43, 45 ], [ 26, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 46, 50 ], [ 46, 51 ], [ 26, 52 ], [ 52, 53 ], [ 53, 54 ], [ 24, 55 ], [ 55, 56 ], [ 305, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 61, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 61, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 90, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 90, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 59, 110 ], [ 110, 111 ], [ 59, 112 ], [ 112, 113 ], [ 59, 114 ], [ 114, 115 ], [ 305, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 116, 120 ], [ 120, 121 ], [ 120, 122 ], [ 116, 124 ], [ 124, 125 ], [ 116, 126 ], [ 126, 127 ], [ 116, 128 ], [ 128, 129 ], [ 116, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 130, 138 ], [ 138, 139 ], [ 116, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 143, 148 ], [ 148, 149 ], [ 149, 150 ], [ 142, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 151, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 159, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 155, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 142, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 116, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 187, 192 ], [ 192, 193 ], [ 193, 194 ], [ 193, 195 ], [ 192, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 187, 201 ], [ 201, 202 ], [ 201, 203 ], [ 187, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 208, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 187, 217 ], [ 217, 218 ], [ 217, 219 ], [ 187, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 220, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 227, 231 ], [ 231, 232 ], [ 231, 233 ], [ 226, 234 ], [ 234, 235 ], [ 235, 236 ], [ 225, 237 ], [ 237, 238 ], [ 237, 239 ], [ 225, 240 ], [ 240, 241 ], [ 240, 242 ], [ 242, 243 ], [ 242, 244 ], [ 225, 245 ], [ 245, 246 ], [ 245, 247 ], [ 247, 248 ], [ 187, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 116, 253 ], [ 253, 254 ], [ 253, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 256, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 262, 265 ], [ 255, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 253, 270 ], [ 270, 271 ], [ 116, 272 ], [ 272, 273 ], [ 272, 274 ], [ 274, 275 ], [ 275, 276 ], [ 279, 277 ], [ 289, 278 ], [ 286, 279 ], [ 279, 280 ], [ 280, 281 ], [ 280, 282 ], [ 279, 283 ], [ 283, 284 ], [ 283, 285 ], [ 286, 286 ], [ 286, 287 ], [ 286, 288 ], [ 289, 289 ], [ 289, 290 ], [ 289, 291 ], [ 279, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 272, 296 ], [ 296, 297 ], [ 116, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 300, 302 ], [ 302, 303 ], [ 0, 304 ], [ 304, 305 ], [ 304, 306 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Vishal Burman\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "InputReader in = new InputReader(inputStream);", "in", "new InputReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "BEasyLinearProgramming solver = new BEasyLinearProgramming();", "solver", "new BEasyLinearProgramming()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }\n\n }", "BEasyLinearProgramming", "public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }", "solve", "{\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }", "long a = in.nextLong();", "a", "in.nextLong()", "in.nextLong", "in", "long b = in.nextLong();", "b", "in.nextLong()", "in.nextLong", "in", "long c = in.nextLong();", "c", "in.nextLong()", "in.nextLong", "in", "long k = in.nextLong();", "k", "in.nextLong()", "in.nextLong", "in", "if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));", "k <= a", "k", "a", "out.println(k)", "out.println", "out", "k", "if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));", "k <= (a + b)", "k", "(a + b)", "a", "b", "out.println(a)", "out.println", "out", "a", "out.println(a - (k - a - b))", "out.println", "out", "a - (k - a - b)", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "int testNumber", "testNumber", "InputReader in", "in", "PrintWriter out", "out", "static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }", "InputReader", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "private InputReader.SpaceCharFilter filter;", "filter", "public InputReader(InputStream stream) {\n this.stream = stream;\n }", "InputReader", "{\n this.stream = stream;\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "read", "{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "if (numChars == -1) {\n throw new InputMismatchException();\n }", "numChars == -1", "numChars", "-1", "1", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar >= numChars", "curChar", "numChars", "{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar = 0", "curChar", "0", "try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }", "catch (IOException e) {\n throw new InputMismatchException();\n }", "IOException e", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "{\n numChars = stream.read(buf);\n }", "numChars = stream.read(buf)", "numChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (numChars <= 0) {\n return -1;\n }", "numChars <= 0", "numChars", "0", "{\n return -1;\n }", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "nextLong", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "long res = 0;", "res", "0", "do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }", "if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }", "c < '0' || c > '9'", "c < '0'", "c", "'0'", "c > '9'", "c", "'9'", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "isSpaceChar", "{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "if (filter != null) {\n return filter.isSpaceChar(c);\n }", "filter != null", "filter", "null", "{\n return filter.isSpaceChar(c);\n }", "return filter.isSpaceChar(c);", "filter.isSpaceChar(c)", "filter.isSpaceChar", "filter", "c", "return isWhitespace(c);", "isWhitespace(c)", "isWhitespace", "c", "int c", "c", "public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isWhitespace", "{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }", "SpaceCharFilter", "public boolean isSpaceChar(int ch);", "isSpaceChar", "int ch", "ch", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n if (k <= a)\n out.println(k);\n else if (k <= (a + b))\n out.println(a);\n else\n out.println(a - (k - a - b));\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Vishal Burman */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); BEasyLinearProgramming solver = new BEasyLinearProgramming(); solver.solve(1, in, out); out.close(); } static class BEasyLinearProgramming { public void solve(int testNumber, InputReader in, PrintWriter out) { long a = in.nextLong(); long b = in.nextLong(); long c = in.nextLong(); long k = in.nextLong(); if (k <= a) out.println(k); else if (k <= (a + b)) out.println(a); else out.println(a - (k - a - b)); } } static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private InputReader.SpaceCharFilter filter; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) { throw new InputMismatchException(); } if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) { return -1; } } return buf[curChar++]; } public long nextLong() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') { throw new InputMismatchException(); } res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public boolean isSpaceChar(int c) { if (filter != null) { return filter.isSpaceChar(c); } return isWhitespace(c); } public static boolean isWhitespace(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 17, 14, 2, 13, 17, 30, 0, 13, 13, 0, 13, 17, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 89, 8 ], [ 89, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 11, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 11, 35 ], [ 35, 36 ], [ 35, 37 ], [ 11, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 42, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 42, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 63, 65 ], [ 42, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 38, 77 ], [ 77, 78 ], [ 77, 79 ], [ 11, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 9, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String args[]) {\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String args[]) {\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }\n}", "Main", "public static void main(String args[]) {\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }", "main", "{\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a=sc.nextLong();", "a", "sc.nextLong()", "sc.nextLong", "sc", "long b=sc.nextLong();", "b", "sc.nextLong()", "sc.nextLong", "sc", "long c=sc.nextLong();", "c", "sc.nextLong()", "sc.nextLong", "sc", "long k=sc.nextLong();", "k", "sc.nextLong()", "sc.nextLong", "sc", "long\tmx=0;", "mx", "0", "if(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;", "k>a", "k", "a", "{\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}", "mx=mx+a", "mx", "mx+a", "mx", "a", "k=k-a", "k", "k-a", "k", "a", "if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;", "k>b", "k", "b", "{\n\t\t k=k-b;\n\t\t }", "k=k-b", "k", "k-b", "k", "b", "k=0", "k", "0", "if(k>0){\n\t\t mx-=k;k=0;\n\t\t }", "k>0", "k", "0", "{\n\t\t mx-=k;k=0;\n\t\t }", "mx-=k", "mx", "k", "k=0", "k", "0", "mx=k", "mx", "k", "System.out.println(mx)", "System.out.println", "System.out", "System", "System.out", "mx", "String args[]", "args", "public class Main {\n public static void main(String args[]) {\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }\n}", "public class Main {\n public static void main(String args[]) {\n\n Scanner sc=new Scanner(System.in);\n\t\t long a=sc.nextLong();\n\t\t long b=sc.nextLong();\n\t\t long c=sc.nextLong();\n\t\t long k=sc.nextLong();\n\t\t//String t=sc.next();\nlong\tmx=0;\n\t\tif(k>a){\n\t\t mx=mx+a;\n\t\t k=k-a;\n\t\t if(k>b){\n\t\t k=k-b;\n\t\t }else k=0;\n\t\t \n\t\t if(k>0){\n\t\t mx-=k;k=0;\n\t\t }\n\t\t \n\t\t}else mx=k;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(mx);\n\t\n\n\n\n\n \n // System.out.println(\"Hello World!\");\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String args[]) { Scanner sc=new Scanner(System.in); long a=sc.nextLong(); long b=sc.nextLong(); long c=sc.nextLong(); long k=sc.nextLong(); //String t=sc.next(); long mx=0; if(k>a){ mx=mx+a; k=k-a; if(k>b){ k=k-b; }else k=0; if(k>0){ mx-=k;k=0; } }else mx=k; System.out.println(mx); // System.out.println("Hello World!"); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 29, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 30, 41, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 41, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 52, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 66, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 6, 83 ], [ 83, 84 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }\n \n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }\n \n\n}", "Main", "public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }", "main", "{\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int d = a + b;", "d", "a + b", "a", "b", "if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }", "a >= k", "a", "k", "{\n System.out.println(String.valueOf(k));\n return;\n }", "System.out.println(String.valueOf(k))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(k)", "String.valueOf", "String", "k", "return;", "if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }", "d >= k", "d", "k", "{\n System.out.println(String.valueOf(a));\n }", "System.out.println(String.valueOf(a))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(a)", "String.valueOf", "String", "a", "{\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }", "int e = k - d;", "e", "k - d", "k", "d", "System.out.println(String.valueOf(a - e))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(a - e)", "String.valueOf", "String", "a - e", "a", "e", "String args[]", "args", "public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }\n \n\n}", "public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int d = a + b;\n\n if (a >= k) {\n System.out.println(String.valueOf(k));\n return;\n }\n\n\n if (d >= k) {\n System.out.println(String.valueOf(a));\n } else {\n int e = k - d;\n System.out.println(String.valueOf(a - e));\n }\n }\n \n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = scan.nextInt(); int d = a + b; if (a >= k) { System.out.println(String.valueOf(k)); return; } if (d >= k) { System.out.println(String.valueOf(a)); } else { int e = k - d; System.out.println(String.valueOf(a - e)); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 4, 18, 18, 13, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 18, 13, 2, 13, 17, 42, 2, 2, 13, 17, 2, 4, 18, 13, 13, 4, 18, 13, 13, 30, 0, 13, 18, 13, 2, 13, 17, 14, 2, 4, 18, 13, 13, 4, 18, 13, 13, 30, 40, 13, 0, 18, 13, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 17, 28, 13, 4, 18, 13, 30, 30, 14, 2, 13, 13, 29, 17, 29, 17, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 29, 20, 29, 17, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 40, 17, 29, 17, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 341, 11 ], [ 341, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 14, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 14, 38 ], [ 38, 39 ], [ 38, 40 ], [ 14, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 51, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 12, 80 ], [ 80, 81 ], [ 341, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 84, 90 ], [ 90, 91 ], [ 90, 92 ], [ 84, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 94, 105 ], [ 106, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 106, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 114, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 133, 135 ], [ 106, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 137, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 136, 146 ], [ 146, 147 ], [ 147, 148 ], [ 106, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 84, 154 ], [ 154, 155 ], [ 82, 156 ], [ 156, 157 ], [ 341, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 160, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 167, 172 ], [ 173, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 174, 178 ], [ 178, 179 ], [ 160, 180 ], [ 180, 181 ], [ 158, 182 ], [ 182, 183 ], [ 341, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 187, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 194, 197 ], [ 187, 198 ], [ 198, 199 ], [ 199, 200 ], [ 187, 201 ], [ 202, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 203, 209 ], [ 209, 210 ], [ 186, 211 ], [ 211, 212 ], [ 184, 213 ], [ 213, 214 ], [ 341, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 218, 222 ], [ 222, 223 ], [ 223, 224 ], [ 217, 225 ], [ 225, 226 ], [ 215, 227 ], [ 227, 228 ], [ 341, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 229, 233 ], [ 233, 234 ], [ 229, 235 ], [ 235, 236 ], [ 235, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 237, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 243, 247 ], [ 235, 248 ], [ 248, 249 ], [ 235, 250 ], [ 250, 251 ], [ 341, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 252, 256 ], [ 256, 257 ], [ 252, 258 ], [ 258, 259 ], [ 258, 260 ], [ 260, 261 ], [ 261, 262 ], [ 261, 263 ], [ 252, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 267, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 280, 281 ], [ 281, 282 ], [ 282, 283 ], [ 277, 284 ], [ 284, 285 ], [ 285, 286 ], [ 285, 287 ], [ 266, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 252, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 295, 296 ], [ 296, 297 ], [ 297, 298 ], [ 296, 299 ], [ 299, 300 ], [ 252, 301 ], [ 301, 302 ], [ 301, 303 ], [ 303, 304 ], [ 304, 305 ], [ 305, 306 ], [ 306, 307 ], [ 305, 308 ], [ 308, 309 ], [ 252, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 315, 316 ], [ 314, 317 ], [ 317, 318 ], [ 252, 319 ], [ 319, 320 ], [ 319, 321 ], [ 321, 322 ], [ 322, 323 ], [ 322, 324 ], [ 321, 325 ], [ 325, 326 ], [ 326, 327 ], [ 326, 328 ], [ 328, 329 ], [ 329, 330 ], [ 330, 331 ], [ 325, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 321, 338 ], [ 338, 339 ], [ 0, 340 ], [ 340, 341 ], [ 340, 342 ] ]
[ "import java.math.BigInteger;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }\n\n private static int[] prefix_function(String s) {\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }\n\n private static boolean check(String s) {\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }\n\n private static int[] isPrime(int num) {\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }\n\n private static int sign(long num) {\n if (num < 0) return -1;\n return 1;\n }\n\n private static class Pair {\n int x;\n int y;\n public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }\n }\n\n\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n\n }\n\n}\n\n/**\n * 7 3\n * 3 1 5\n * 9 6 5\n *\n * i = 1: 1\n * i = 2: 2\n * i = 3: 3\n *\n *\n * 1 2 3 3 3 3 3\n */\n\n\n/**\n *\n * 1+1\n **/", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }\n\n private static int[] prefix_function(String s) {\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }\n\n private static boolean check(String s) {\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }\n\n private static int[] isPrime(int num) {\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }\n\n private static int sign(long num) {\n if (num < 0) return -1;\n return 1;\n }\n\n private static class Pair {\n int x;\n int y;\n public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }\n }\n\n\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n\n }\n\n}", "Main", "public static void main(String[] args) {\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }", "main", "{\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }", "FastReader sc = new FastReader();", "sc", "new FastReader()", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int res = 0;", "res", "0", "if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }", "k<a", "k", "a", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "{\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }", "res+=a", "res", "a", "k-=a", "k", "a", "if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }", "k<b", "k", "b", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "{\n k-=b;\n System.out.println(res-k);\n }", "k-=b", "k", "b", "System.out.println(res-k)", "System.out.println", "System.out", "System", "System.out", "res-k", "res", "k", "String[] args", "args", "private static int[] prefix_function(String s) {\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }", "prefix_function", "{\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }", "int n = s.length();", "n", "s.length()", "s.length", "s", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }", "{\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }", "int j = res[i-1];", "j", "res[i-1]", "res", "i-1", "i", "1", "while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }", "j > 0 && s.charAt(i) != s.charAt(j)", "j > 0", "j", "0", "s.charAt(i) != s.charAt(j)", "s.charAt(i)", "s.charAt", "s", "i", "s.charAt(j)", "s.charAt", "s", "j", "{\n j = res[j-1];\n }", "j = res[j-1]", "j", "res[j-1]", "res", "j-1", "j", "1", "if (s.charAt(i)==s.charAt(j)) {\n j++;\n }", "s.charAt(i)==s.charAt(j)", "s.charAt(i)", "s.charAt", "s", "i", "s.charAt(j)", "s.charAt", "s", "j", "{\n j++;\n }", "j++", "j", "res[i] = j", "res[i]", "res", "i", "j", "return res;", "res", "String s", "s", "private static boolean check(String s) {\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }", "check", "{\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }", "char cc = s.charAt(0);", "cc", "s.charAt(0)", "s.charAt", "s", "0", "for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }", "char c", "s.toCharArray()", "s.toCharArray", "s", "{\n if (c!=cc) return false;\n }", "{\n if (c!=cc) return false;\n }", "if (c!=cc) return false;", "c!=cc", "c", "cc", "return false;", "false", "return true;", "true", "String s", "s", "private static int[] isPrime(int num) {\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }", "isPrime", "{\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }", "for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }", "int i = 2;", "int i = 2;", "i", "2", "i <= (int)Math.sqrt(num)", "i", "(int)Math.sqrt(num)", "Math.sqrt", "Math", "num", "i++", "i++", "i", "{\n if (num % i == 0) return new int[]{i, num/i};\n }", "{\n if (num % i == 0) return new int[]{i, num/i};\n }", "if (num % i == 0) return new int[]{i, num/i};", "num % i == 0", "num % i", "num", "i", "0", "return new int[]{i, num/i};", "new int[]{i, num/i}", "return null;", "null", "int num", "num", "private static int sign(long num) {\n if (num < 0) return -1;\n return 1;\n }", "sign", "{\n if (num < 0) return -1;\n return 1;\n }", "if (num < 0) return -1;", "num < 0", "num", "0", "return -1;", "-1", "1", "return 1;", "1", "long num", "num", "private static class Pair {\n int x;\n int y;\n public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }\n }", "Pair", "int x;", "x", "int y;", "y", "public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }", "Pair", "{\n this.x=x;\n this.y=y;\n }", "this.x=x", "this.x", "this", "this.x", "x", "this.y=y", "this.y", "this", "this.y", "y", "int x", "x", "int y", "y", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }", "br = new BufferedReader(new\n InputStreamReader(System.in))", "br", "new BufferedReader(new\n InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }\n\n private static int[] prefix_function(String s) {\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }\n\n private static boolean check(String s) {\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }\n\n private static int[] isPrime(int num) {\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }\n\n private static int sign(long num) {\n if (num < 0) return -1;\n return 1;\n }\n\n private static class Pair {\n int x;\n int y;\n public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }\n }\n\n\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n if(k<a) System.out.println(k);\n else {\n res+=a;\n k-=a;\n if (k<b) System.out.println(res);\n else {\n k-=b;\n System.out.println(res-k);\n }\n }\n //x+a*t == y - b * t\n //a*t+b*t == y - x\n //(a+b)*t == y - x\n // a + (a*2(k-1) = n*2/k\n // a+(a+2k-2)=2a+2k-2=n*2/k\n }\n\n private static int[] prefix_function(String s) {\n int n = s.length();\n int[] res = new int[n];\n for (int i = 1; i < n; i++) {\n int j = res[i-1];\n while (j > 0 && s.charAt(i) != s.charAt(j)) {\n j = res[j-1];\n }\n if (s.charAt(i)==s.charAt(j)) {\n j++;\n }\n res[i] = j;\n }\n return res;\n }\n\n private static boolean check(String s) {\n char cc = s.charAt(0);\n for (char c : s.toCharArray()) {\n if (c!=cc) return false;\n }\n return true;\n }\n\n private static int[] isPrime(int num) {\n for (int i = 2; i <= (int)Math.sqrt(num); i++) {\n if (num % i == 0) return new int[]{i, num/i};\n }\n return null;\n }\n\n private static int sign(long num) {\n if (num < 0) return -1;\n return 1;\n }\n\n private static class Pair {\n int x;\n int y;\n public Pair(int x, int y) {\n this.x=x;\n this.y=y;\n }\n }\n\n\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n\n }\n\n}", "Main" ]
import java.math.BigInteger; import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { FastReader sc = new FastReader(); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int res = 0; if(k<a) System.out.println(k); else { res+=a; k-=a; if (k<b) System.out.println(res); else { k-=b; System.out.println(res-k); } } //x+a*t == y - b * t //a*t+b*t == y - x //(a+b)*t == y - x // a + (a*2(k-1) = n*2/k // a+(a+2k-2)=2a+2k-2=n*2/k } private static int[] prefix_function(String s) { int n = s.length(); int[] res = new int[n]; for (int i = 1; i < n; i++) { int j = res[i-1]; while (j > 0 && s.charAt(i) != s.charAt(j)) { j = res[j-1]; } if (s.charAt(i)==s.charAt(j)) { j++; } res[i] = j; } return res; } private static boolean check(String s) { char cc = s.charAt(0); for (char c : s.toCharArray()) { if (c!=cc) return false; } return true; } private static int[] isPrime(int num) { for (int i = 2; i <= (int)Math.sqrt(num); i++) { if (num % i == 0) return new int[]{i, num/i}; } return null; } private static int sign(long num) { if (num < 0) return -1; return 1; } private static class Pair { int x; int y; public Pair(int x, int y) { this.x=x; this.y=y; } } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } } /** * 7 3 * 3 1 5 * 9 6 5 * * i = 1: 1 * i = 2: 2 * i = 3: 3 * * * 1 2 3 3 3 3 3 */ /** * * 1+1 **/
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 17, 9, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 17, 9, 30, 0, 13, 17, 0, 13, 17, 9, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 89, 5 ], [ 89, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 48, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 60, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 76, 78 ], [ 72, 79 ], [ 8, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 6, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < K", "i", "K", "i++", "i++", "i", "{\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}", "if(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}", "A > 0", "A", "0", "{\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}", "sum += 1", "sum", "1", "A -= 1", "A", "1", "continue;", "if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}", "B > 0", "B", "0", "{\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t}", "sum += 0", "sum", "0", "B -= 1", "B", "1", "continue;", "{\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}", "sum -= 1", "sum", "1", "C -= 1", "C", "1", "continue;", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\tif(A > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t\tcontinue;\n\t\t\t}else if(B > 0) {\n\t\t\t\tsum += 0;\n\t\t\t\tB -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t\tC -= 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int sum = 0; for(int i = 0; i < K; i++) { if(A > 0) { sum += 1; A -= 1; continue; }else if(B > 0) { sum += 0; B -= 1; continue; } else { sum -= 1; C -= 1; continue; } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 40, 13, 40, 13, 30, 14, 2, 13, 17, 30, 40, 13, 30, 40, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 48, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 58, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ] ]
[ "import java.util.*;\nclass Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n int b=sc.nextInt();\n int c=sc.nextInt();\n int k=sc.nextInt();\n int sum=0;\n for(int i=0;i<k;i++)\n {\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "class Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n int b=sc.nextInt();\n int c=sc.nextInt();\n int k=sc.nextInt();\n int sum=0;\n for(int i=0;i<k;i++)\n {\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n int b=sc.nextInt();\n int c=sc.nextInt();\n int k=sc.nextInt();\n int sum=0;\n for(int i=0;i<k;i++)\n {\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n int b=sc.nextInt();\n int c=sc.nextInt();\n int k=sc.nextInt();\n int sum=0;\n for(int i=0;i<k;i++)\n {\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }\n System.out.println(sum);\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b=sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c=sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum=0;", "sum", "0", "for(int i=0;i<k;i++)\n {\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<k", "i", "k", "i++", "i++", "i", "{\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }", "{\n if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }\n }", "if(a!=0)\n {\n sum++;\n a--;\n }\n else \n {\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }", "a!=0", "a", "0", "{\n sum++;\n a--;\n }", "sum++", "sum", "a--", "a", "{\n if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }\n }", "if(b!=0)\n {\n b--;\n }\n else\n {\n c--;\n sum--;\n }", "b!=0", "b", "0", "{\n b--;\n }", "b--", "b", "{\n c--;\n sum--;\n }", "c--", "c", "sum--", "sum", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String args[]", "args" ]
import java.util.*; class Main { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int k=sc.nextInt(); int sum=0; for(int i=0;i<k;i++) { if(a!=0) { sum++; a--; } else { if(b!=0) { b--; } else { c--; sum--; } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 6, 72 ], [ 72, 73 ], [ 0, 74 ], [ 74, 75 ], [ 74, 76 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int result = 0;", "result", "0", "if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }", "a >= k", "a", "k", "{\n result += k;\n }", "result += k", "result", "k", "if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }", "a + b >= k", "a + b", "a", "b", "k", "{\n result += a;\n }", "result += a", "result", "a", "{\n result += ( a - (k - a - b));\n }", "result += ( a - (k - a - b))", "result", "( a - (k - a - b))", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "System.out.println(String.valueOf(result))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(result)", "String.valueOf", "String", "result", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n\n int result = 0;\n\n if(a >= k) {\n result += k;\n } else if(a + b >= k) {\n result += a;\n } else {\n result += ( a - (k - a - b));\n }\n \n System.out.println(String.valueOf(result));\n\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = scan.nextInt(); int result = 0; if(a >= k) { result += k; } else if(a + b >= k) { result += a; } else { result += ( a - (k - a - b)); } System.out.println(String.valueOf(result)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 40, 13, 40, 13, 14, 2, 13, 17, 30, 40, 13, 14, 2, 13, 17, 30, 40, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 82, 5 ], [ 82, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 48, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 57, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 6, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<K", "i", "K", "i++", "i++", "i", "{\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }", "{\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }", "if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }", "A>0", "A", "0", "{\n sum++;\n A--;\n }", "sum++", "sum", "A--", "A", "if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }", "B>0", "B", "0", "{\n B--;\n }", "B--", "B", "if(C>0) {\n sum--;\n C--;\n }", "C>0", "C", "0", "{\n sum--;\n C--;\n }", "sum--", "sum", "C--", "C", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int sum = 0;\n \n for(int i=0; i<K; i++) {\n if(A>0) {\n sum++;\n A--;\n } else if(B>0) {\n B--;\n } else if(C>0) {\n sum--;\n C--;\n }\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int sum = 0; for(int i=0; i<K; i++) { if(A>0) { sum++; A--; } else if(B>0) { B--; } else if(C>0) { sum--; C--; } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 13, 17, 30, 14, 2, 13, 17, 30, 40, 13, 40, 13, 40, 13, 14, 2, 13, 17, 30, 40, 13, 40, 13, 14, 2, 13, 17, 30, 40, 13, 40, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 44, 49 ], [ 49, 50 ], [ 40, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 51, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 64, 69 ], [ 69, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int score = 0;", "score", "0", "while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }", "K > 0", "K", "0", "{\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }", "if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }", "A > 0", "A", "0", "{\n A--;\n K--;\n score++;\n }", "A--", "A", "K--", "K", "score++", "score", "if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }", "B > 0", "B", "0", "{\n B--;\n K--;\n }", "B--", "B", "K--", "K", "if(C > 0){\n C--;\n K--;\n score--;\n }", "C > 0", "C", "0", "{\n C--;\n K--;\n score--;\n }", "C--", "C", "K--", "K", "score--", "score", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}\n}", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n while(K > 0){\n if(A > 0){\n A--;\n K--;\n score++;\n }\n else if(B > 0){\n B--;\n K--;\n }\n else if(C > 0){\n C--;\n K--;\n score--;\n }\n }\n System.out.println(score);\n\t\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int score = 0; while(K > 0){ if(A > 0){ A--; K--; score++; } else if(B > 0){ B--; K--; } else if(C > 0){ C--; K--; score--; } } System.out.println(score); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 2, 2, 17, 13, 2, 40, 17, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 8, 41 ], [ 41, 42 ], [ 41, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 6, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }\n\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long A = sc.nextLong();", "A", "sc.nextLong()", "sc.nextLong", "sc", "long B = sc.nextLong();", "B", "sc.nextLong()", "sc.nextLong", "sc", "long C = sc.nextLong();", "C", "sc.nextLong()", "sc.nextLong", "sc", "long K = sc.nextLong();", "K", "sc.nextLong()", "sc.nextLong", "sc", "sc.close()", "sc.close", "sc", "long aCount = 0;", "aCount", "0", "long bCount = 0;", "bCount", "0", "long cCount = 0;", "cCount", "0", "if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }", "K <= A", "K", "A", "{\n aCount = K;\n }", "aCount = K", "aCount", "K", "{\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }", "aCount = A", "aCount", "A", "K -= A", "K", "A", "if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }", "K <= B", "K", "B", "{\n bCount = K;\n }", "bCount = K", "bCount", "K", "{\n bCount = B;\n K -= B;\n cCount = K;\n }", "bCount = B", "bCount", "B", "K -= B", "K", "B", "cCount = K", "cCount", "K", "System.out.println(1 * aCount + (-1) * cCount)", "System.out.println", "System.out", "System", "System.out", "1 * aCount + (-1) * cCount", "1 * aCount", "1", "aCount", "(-1) * cCount", "(-1)", "1", "cCount", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n sc.close();\n\n long aCount = 0;\n long bCount = 0;\n long cCount = 0;\n\n if (K <= A) {\n aCount = K;\n } else {\n aCount = A;\n K -= A;\n if (K <= B) {\n bCount = K;\n } else {\n bCount = B;\n K -= B;\n cCount = K;\n }\n }\n\n System.out.println(1 * aCount + (-1) * cCount);\n }\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); long C = sc.nextLong(); long K = sc.nextLong(); sc.close(); long aCount = 0; long bCount = 0; long cCount = 0; if (K <= A) { aCount = K; } else { aCount = A; K -= A; if (K <= B) { bCount = K; } else { bCount = B; K -= B; cCount = K; } } System.out.println(1 * aCount + (-1) * cCount); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 2, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 35, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 35, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }", "main", "{\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "long a = s.nextLong();", "a", "s.nextLong()", "s.nextLong", "s", "long b = s.nextLong();", "b", "s.nextLong()", "s.nextLong", "s", "long c = s.nextLong();", "c", "s.nextLong()", "s.nextLong", "s", "long k = s.nextLong();", "k", "s.nextLong()", "s.nextLong", "s", "long ans = 0;", "ans", "0", "if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }", "k >= (a+b)", "k", "(a+b)", "a", "b", "{\n ans = a-(k-(a+b));\n }", "ans = a-(k-(a+b))", "ans", "a-(k-(a+b))", "a", "(k-(a+b))", "k", "(a+b)", "a", "b", "if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }", "k >= a", "k", "a", "{\n ans = a;\n }", "ans = a", "ans", "a", "{\n ans = k;\n }", "ans = k", "ans", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n long a = s.nextLong();\n long b = s.nextLong();\n long c = s.nextLong();\n long k = s.nextLong();\n long ans = 0;\n if(k >= (a+b)) {\n ans = a-(k-(a+b));\n } else if(k >= a) {\n ans = a;\n } else {\n ans = k;\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); long a = s.nextLong(); long b = s.nextLong(); long c = s.nextLong(); long k = s.nextLong(); long ans = 0; if(k >= (a+b)) { ans = a-(k-(a+b)); } else if(k >= a) { ans = a; } else { ans = k; } System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 13, 13, 30, 41, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 82, 8 ], [ 82, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 11, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 11, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 35, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 35, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 9, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.util.*;\nimport java.math.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a = sc.nextLong();", "a", "sc.nextLong()", "sc.nextLong", "sc", "long b = sc.nextLong();", "b", "sc.nextLong()", "sc.nextLong", "sc", "long c = sc.nextLong();", "c", "sc.nextLong()", "sc.nextLong", "sc", "long k = sc.nextLong();", "k", "sc.nextLong()", "sc.nextLong", "sc", "if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }", "a+b<=k", "a+b", "a", "b", "k", "{\n long ans = a-(k-a-b);\n System.out.println(ans);\n }", "long ans = a-(k-a-b);", "ans", "a-(k-a-b)", "a", "(k-a-b)", "k-a-b", "k", "a", "b", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }", "a<=k", "a", "k", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "if(a>k){\n System.out.println(k);\n }", "a>k", "a", "k", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n if(a+b<=k){\n long ans = a-(k-a-b);\n System.out.println(ans);\n } else if(a<=k){\n System.out.println(a);\n } else if(a>k){\n System.out.println(k);\n }\n\t}\n}", "Main" ]
import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); long k = sc.nextLong(); if(a+b<=k){ long ans = a-(k-a-b); System.out.println(ans); } else if(a<=k){ System.out.println(a); } else if(a>k){ System.out.println(k); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 17, 30, 14, 2, 13, 17, 30, 3, 42, 2, 13, 17, 30, 40, 13, 40, 13, 40, 13, 14, 2, 13, 17, 30, 3, 14, 2, 13, 17, 30, 3, 42, 2, 13, 17, 30, 40, 13, 40, 13, 14, 2, 13, 17, 30, 3, 14, 2, 13, 17, 30, 3, 42, 2, 13, 17, 30, 40, 13, 40, 13, 40, 13, 14, 2, 13, 17, 30, 3, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 23, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 23, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 23, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 23, 47 ], [ 47, 48 ], [ 47, 49 ], [ 23, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 52, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 63, 68 ], [ 68, 69 ], [ 63, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 52, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 52, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 86, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 52, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 52, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 107, 112 ], [ 112, 113 ], [ 107, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 23, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 21, 126 ], [ 126, 127 ] ]
[ "import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.HashSet;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A=sc.nextInt();\n int B=sc.nextInt();\n int C=sc.nextInt();\n int K=sc.nextInt();\n int ans=0;\n while(true){\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }\n\n\n System.out.println(ans);\n\n\n\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.stream.Collectors;", "Collectors", "java.util.stream", "import java.util.HashSet;", "HashSet", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A=sc.nextInt();\n int B=sc.nextInt();\n int C=sc.nextInt();\n int K=sc.nextInt();\n int ans=0;\n while(true){\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }\n\n\n System.out.println(ans);\n\n\n\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A=sc.nextInt();\n int B=sc.nextInt();\n int C=sc.nextInt();\n int K=sc.nextInt();\n int ans=0;\n while(true){\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }\n\n\n System.out.println(ans);\n\n\n\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int A=sc.nextInt();\n int B=sc.nextInt();\n int C=sc.nextInt();\n int K=sc.nextInt();\n int ans=0;\n while(true){\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }\n\n\n System.out.println(ans);\n\n\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A=sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B=sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C=sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K=sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int ans=0;", "ans", "0", "while(true){\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }", "true", "{\n if(K==0){\n break;\n }\n while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }\n if(K==0){\n break;\n }\n while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }\n\n }", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "while(A>0){\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }", "A>0", "A", "0", "{\n K--;\n A--;\n ans++;\n if(K==0){\n break;\n }\n }", "K--", "K", "A--", "A", "ans++", "ans", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "while(B>0){\n K--;\n B--;\n if(K==0){\n break;\n }\n }", "B>0", "B", "0", "{\n K--;\n B--;\n if(K==0){\n break;\n }\n }", "K--", "K", "B--", "B", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "while(C>0){\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }", "C>0", "C", "0", "{\n C--;\n K--;\n ans--;\n if(K==0){\n break;\n }\n }", "C--", "C", "K--", "K", "ans--", "ans", "if(K==0){\n break;\n }", "K==0", "K", "0", "{\n break;\n }", "break;", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.Scanner; import java.util.Arrays; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.HashSet; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A=sc.nextInt(); int B=sc.nextInt(); int C=sc.nextInt(); int K=sc.nextInt(); int ans=0; while(true){ if(K==0){ break; } while(A>0){ K--; A--; ans++; if(K==0){ break; } } if(K==0){ break; } while(B>0){ K--; B--; if(K==0){ break; } } if(K==0){ break; } while(C>0){ C--; K--; ans--; if(K==0){ break; } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 4, 18, 13, 13, 13, 4, 18, 13, 2, 2, 13, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 55, 5 ], [ 55, 6 ], [ 6, 7 ], [ 6, 8 ], [ 55, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 11, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 11, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 38, 42 ], [ 37, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 47, 47 ], [ 47, 48 ], [ 47, 49 ], [ 47, 50 ], [ 43, 51 ], [ 9, 52 ], [ 52, 53 ], [ 0, 54 ], [ 54, 55 ], [ 54, 56 ] ]
[ "import java.util.*;\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}", "main", "{\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(Math.min(a, k) - Math.max(k - a - b, 0))", "System.out.println", "System.out", "System", "System.out", "Math.min(a, k) - Math.max(k - a - b, 0)", "Math.min(a, k)", "Math.min", "Math", "a", "k", "Math.max(k - a - b, 0)", "Math.max", "Math", "k - a - b", "k - a - b", "k", "a", "b", "0", "String[] args", "args", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}\n}", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSystem.out.println(Math.min(a, k) - Math.max(k - a - b, 0));\n\t}\n}", "Main" ]
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); System.out.println(Math.min(a, k) - Math.max(k - a - b, 0)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 14, 2, 2, 13, 2, 2, 13, 13, 13, 2, 2, 2, 13, 13, 13, 2, 17, 4, 18, 13, 17, 17, 30, 14, 2, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 2, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 123, 5 ], [ 123, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 19, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 29, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 37, 39 ], [ 8, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 75, 79 ], [ 58, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 87, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 96, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 81, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 80, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 6, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "String str = scan.nextLine();", "str", "scan.nextLine()", "scan.nextLine", "scan", "String[] in = str.split(\" \",0);", "in", "str.split(\" \",0)", "str.split", "str", "\" \"", "0", "int a = Integer.valueOf(in[0]);", "a", "Integer.valueOf(in[0])", "Integer.valueOf", "Integer", "in[0]", "in", "0", "int b = Integer.valueOf(in[1]);", "b", "Integer.valueOf(in[1])", "Integer.valueOf", "Integer", "in[1]", "in", "1", "int c = Integer.valueOf(in[2]);", "c", "Integer.valueOf(in[2])", "Integer.valueOf", "Integer", "in[2]", "in", "2", "int k = Integer.valueOf(in[3]);", "k", "Integer.valueOf(in[3])", "Integer.valueOf", "Integer", "in[3]", "in", "3", "int out;", "out", "if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }", "k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)", "k <= (a + b + c)", "k", "(a + b + c)", "a + b + c", "a", "b", "c", "(a + b + c) <= 2*Math.pow(10 , 9)", "(a + b + c)", "a + b + c", "a", "b", "c", "2*Math.pow(10 , 9)", "2", "Math.pow(10 , 9)", "Math.pow", "Math", "10", "9", "{\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }", "if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }", "k - a >= 0", "k - a", "k", "a", "0", "{\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }", "out = a", "out", "a", "k = k - a", "k", "k - a", "k", "a", "if(k - b >= 0){\n out = out - (k-b);\n }", "k - b >= 0", "k - b", "k", "b", "0", "{\n out = out - (k-b);\n }", "out = out - (k-b)", "out", "out - (k-b)", "out", "(k-b)", "k", "b", "{\n out = k;\n }", "out = k", "out", "k", "System.out.println(out)", "System.out.println", "System.out", "System", "System.out", "out", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String str = scan.nextLine();\n String[] in = str.split(\" \",0);\n int a = Integer.valueOf(in[0]);\n int b = Integer.valueOf(in[1]);\n int c = Integer.valueOf(in[2]);\n int k = Integer.valueOf(in[3]);\n int out;\n if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){\n if(k - a >= 0){\n out = a;\n k = k - a;\n if(k - b >= 0){\n out = out - (k-b);\n }\n }else {\n out = k;\n }\n System.out.println(out);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String str = scan.nextLine(); String[] in = str.split(" ",0); int a = Integer.valueOf(in[0]); int b = Integer.valueOf(in[1]); int c = Integer.valueOf(in[2]); int k = Integer.valueOf(in[3]); int out; if(k <= (a + b + c) && (a + b + c) <= 2*Math.pow(10 , 9)){ if(k - a >= 0){ out = a; k = k - a; if(k - b >= 0){ out = out - (k-b); } }else { out = k; } System.out.println(out); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }", "k <= a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }", "k <= a+b", "k", "a+b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(a-(k-a-b));\n }", "System.out.println(a-(k-a-b))", "System.out.println", "System.out", "System", "System.out", "a-(k-a-b)", "a", "(k-a-b)", "k-a-b", "k", "a", "b", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int k = scan.nextInt();\n if (k <= a){\n System.out.println(k);\n }else if (k <= a+b){\n System.out.println(a);\n }else{\n System.out.println(a-(k-a-b));\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = scan.nextInt(); if (k <= a){ System.out.println(k); }else if (k <= a+b){ System.out.println(a); }else{ System.out.println(a-(k-a-b)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 13, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 32, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 32, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 49, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }", "k<=a+b", "k", "a+b", "a", "b", "{\n System.out.println(Math.min(a,k));\n }", "System.out.println(Math.min(a,k))", "System.out.println", "System.out", "System", "System.out", "Math.min(a,k)", "Math.min", "Math", "a", "k", "{\n k-=a+b;\n System.out.println(a-k);\n }", "k-=a+b", "k", "a+b", "a", "b", "System.out.println(a-k)", "System.out.println", "System.out", "System", "System.out", "a-k", "a", "k", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if (k<=a+b){\n System.out.println(Math.min(a,k));\n }else {\n k-=a+b;\n System.out.println(a-k);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); if (k<=a+b){ System.out.println(Math.min(a,k)); }else { k-=a+b; System.out.println(a-k); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 17, 13, 14, 2, 2, 13, 13, 2, 13, 2, 13, 13, 30, 0, 13, 2, 17, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 2, 17, 13, 2, 17, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 90, 5 ], [ 90, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 45, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 45, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 8, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a = sc.nextLong();", "a", "sc.nextLong()", "sc.nextLong", "sc", "long b = sc.nextLong();", "b", "sc.nextLong()", "sc.nextLong", "sc", "long c = sc.nextLong();", "c", "sc.nextLong()", "sc.nextLong", "sc", "long k = sc.nextLong();", "k", "sc.nextLong()", "sc.nextLong", "sc", "long sum = 0;", "sum", "0", "if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }", "k <= a", "k", "a", "{\n sum += 1 * k;\n }", "sum += 1 * k", "sum", "1 * k", "1", "k", "if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }", "k > a && k <= a + b", "k > a", "k", "a", "k <= a + b", "k", "a + b", "a", "b", "{\n sum += 1 * a;\n }", "sum += 1 * a", "sum", "1 * a", "1", "a", "if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }", "k > a + b", "k", "a + b", "a", "b", "{\n sum += 1 * a - 1 * (k - a - b);\n }", "sum += 1 * a - 1 * (k - a - b)", "sum", "1 * a - 1 * (k - a - b)", "1 * a", "1", "a", "1 * (k - a - b)", "1", "(k - a - b)", "k - a - b", "k", "a", "b", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n\n long sum = 0;\n if (k <= a) {\n sum += 1 * k;\n } else if (k > a && k <= a + b) {\n sum += 1 * a;\n } else if (k > a + b) {\n sum += 1 * a - 1 * (k - a - b);\n }\n\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); long k = sc.nextLong(); long sum = 0; if (k <= a) { sum += 1 * k; } else if (k > a && k <= a + b) { sum += 1 * a; } else if (k > a + b) { sum += 1 * a - 1 * (k - a - b); } System.out.println(sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 2, 13, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 106, 11 ], [ 106, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 14, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 14, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 55, 57 ], [ 14, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 58, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 69, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 69, 82 ], [ 82, 83 ], [ 83, 84 ], [ 85, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 83, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 12, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String str[] = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int A = Integer.parseInt(str[0]);", "A", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int B = Integer.parseInt(str[1]);", "B", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "int C = Integer.parseInt(str[2]);", "C", "Integer.parseInt(str[2])", "Integer.parseInt", "Integer", "str[2]", "str", "2", "int K = Integer.parseInt(str[3]);", "K", "Integer.parseInt(str[3])", "Integer.parseInt", "Integer", "str[3]", "str", "3", "if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }", "A >= K", "A", "K", "{\n System.out.println(K);\n }", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }", "A+B >= K", "A+B", "A", "B", "K", "{\n System.out.println(A);\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }", "A+B+C >= K", "A+B+C", "A+B+C", "A", "B", "C", "K", "{\n System.out.println(A-(K - (A+B)));\n }", "System.out.println(A-(K - (A+B)))", "System.out.println", "System.out", "System", "System.out", "A-(K - (A+B))", "A", "(K - (A+B))", "K", "(A+B)", "A", "B", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str[] = br.readLine().split(\" \");\n\n int A = Integer.parseInt(str[0]);\n int B = Integer.parseInt(str[1]);\n int C = Integer.parseInt(str[2]);\n int K = Integer.parseInt(str[3]);\n\n if(A >= K){\n System.out.println(K);\n }\n else if(A+B >= K){\n System.out.println(A);\n }\n else if(A+B+C >= K){\n System.out.println(A-(K - (A+B)));\n }\n }\n}", "Main" ]
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 str[] = br.readLine().split(" "); int A = Integer.parseInt(str[0]); int B = Integer.parseInt(str[1]); int C = Integer.parseInt(str[2]); int K = Integer.parseInt(str[3]); if(A >= K){ System.out.println(K); } else if(A+B >= K){ System.out.println(A); } else if(A+B+C >= K){ System.out.println(A-(K - (A+B))); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 29, 14, 2, 13, 13, 30, 0, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 0, 13, 2, 40, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 88, 5 ], [ 88, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 46, 56 ], [ 8, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 65, 72 ], [ 8, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 8, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 6, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "long B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "long C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "long K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "if (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}", "A < K", "A", "K", "{\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t}", "ans = A", "ans", "A", "K -= A", "K", "A", "{\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}", "ans = K", "ans", "K", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "return;", "if (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}", "B < K", "B", "K", "{\n\t\t\tK -= B;\n\t\t}", "K -= B", "K", "B", "{\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "return;", "ans += -1 * K", "ans", "-1 * K", "-1", "1", "K", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tlong A = sc.nextInt();\n\t\tlong B = sc.nextInt();\n\t\tlong C = sc.nextInt();\n\t\tlong K = sc.nextInt();\n\t\tlong ans = 0;\n\n\t\tif (A < K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t} else {\n\t\t\tans = K;\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tif (B < K){\n\t\t\tK -= B;\n\t\t} else {\n\t\t\tSystem.out.println(ans);\n\t\t\treturn;\n\t\t}\n\n\t\tans += -1 * K;\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long A = sc.nextInt(); long B = sc.nextInt(); long C = sc.nextInt(); long K = sc.nextInt(); long ans = 0; if (A < K){ ans = A; K -= A; } else { ans = K; System.out.println(ans); return; } if (B < K){ K -= B; } else { System.out.println(ans); return; } ans += -1 * K; System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 14, 2, 13, 13, 30, 4, 18, 13, 13, 29, 30, 0, 13, 13, 14, 2, 13, 13, 30, 4, 18, 13, 13, 29, 0, 13, 13, 0, 13, 13, 4, 18, 13, 13, 12, 13, 30, 0, 13, 8, 4, 18, 13, 18, 13, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 4, 13, 4, 18, 13, 14, 40, 4, 18, 13, 4, 13, 2, 2, 4, 18, 13, 13, 17, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 29, 40, 2, 2, 13, 17, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 42, 2, 2, 0, 13, 4, 13, 40, 17, 4, 13, 13, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 41, 13, 4, 13, 41, 13, 17, 42, 2, 2, 13, 13, 40, 4, 13, 13, 30, 0, 18, 13, 40, 13, 13, 0, 13, 4, 13, 29, 8, 2, 13, 13, 13, 4, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 13, 4, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 13, 4, 13, 12, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 533, 20 ], [ 533, 21 ], [ 21, 22 ], [ 533, 23 ], [ 23, 24 ], [ 533, 25 ], [ 25, 26 ], [ 25, 27 ], [ 533, 28 ], [ 28, 29 ], [ 28, 30 ], [ 533, 32 ], [ 32, 33 ], [ 32, 34 ], [ 533, 35 ], [ 35, 36 ], [ 35, 37 ], [ 533, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 40, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 40, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 40, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 61, 66 ], [ 57, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 40, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 75, 80 ], [ 71, 81 ], [ 81, 82 ], [ 81, 83 ], [ 40, 84 ], [ 84, 85 ], [ 84, 86 ], [ 40, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 533, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 96, 100 ], [ 100, 101 ], [ 100, 102 ], [ 96, 103 ], [ 93, 104 ], [ 104, 105 ], [ 104, 106 ], [ 93, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 93, 112 ], [ 112, 113 ], [ 93, 114 ], [ 114, 115 ], [ 115, 116 ], [ 93, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 125, 129 ], [ 124, 130 ], [ 533, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 131, 137 ], [ 137, 138 ], [ 533, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 142, 147 ], [ 147, 148 ], [ 141, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 157, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 153, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 170, 174 ], [ 174, 175 ], [ 175, 176 ], [ 141, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 533, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 187, 191 ], [ 191, 192 ], [ 191, 193 ], [ 182, 194 ], [ 194, 195 ], [ 533, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 199, 200 ], [ 198, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 203, 208 ], [ 208, 209 ], [ 202, 210 ], [ 210, 211 ], [ 210, 212 ], [ 198, 213 ], [ 213, 214 ], [ 533, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 220, 221 ], [ 219, 222 ], [ 222, 223 ], [ 533, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 533, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 233, 234 ], [ 233, 235 ], [ 235, 236 ], [ 232, 237 ], [ 237, 238 ], [ 237, 239 ], [ 232, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 240, 245 ], [ 245, 246 ], [ 246, 247 ], [ 247, 248 ], [ 246, 249 ], [ 245, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 232, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 533, 258 ], [ 258, 259 ], [ 258, 260 ], [ 260, 261 ], [ 261, 262 ], [ 261, 263 ], [ 260, 265 ], [ 265, 266 ], [ 265, 267 ], [ 267, 268 ], [ 260, 269 ], [ 269, 270 ], [ 269, 271 ], [ 260, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 273, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 272, 281 ], [ 281, 282 ], [ 282, 283 ], [ 283, 284 ], [ 283, 285 ], [ 285, 286 ], [ 282, 287 ], [ 281, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 260, 292 ], [ 292, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 293, 297 ], [ 293, 298 ], [ 298, 299 ], [ 299, 300 ], [ 298, 301 ], [ 298, 302 ], [ 258, 303 ], [ 303, 304 ], [ 533, 305 ], [ 305, 306 ], [ 305, 307 ], [ 307, 308 ], [ 308, 309 ], [ 308, 310 ], [ 307, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 314, 316 ], [ 312, 317 ], [ 317, 318 ], [ 317, 319 ], [ 312, 320 ], [ 320, 321 ], [ 321, 322 ], [ 312, 323 ], [ 323, 324 ], [ 324, 325 ], [ 325, 326 ], [ 325, 327 ], [ 324, 328 ], [ 328, 329 ], [ 328, 330 ], [ 307, 331 ], [ 331, 332 ], [ 305, 333 ], [ 333, 334 ], [ 305, 335 ], [ 335, 336 ], [ 533, 337 ], [ 337, 338 ], [ 337, 339 ], [ 339, 340 ], [ 340, 341 ], [ 340, 342 ], [ 339, 344 ], [ 344, 345 ], [ 345, 346 ], [ 346, 347 ], [ 346, 348 ], [ 344, 349 ], [ 349, 350 ], [ 349, 351 ], [ 344, 352 ], [ 352, 353 ], [ 353, 354 ], [ 344, 355 ], [ 355, 356 ], [ 356, 357 ], [ 357, 358 ], [ 357, 359 ], [ 356, 360 ], [ 360, 361 ], [ 339, 362 ], [ 362, 363 ], [ 337, 364 ], [ 364, 365 ], [ 533, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 368, 372 ], [ 372, 373 ], [ 368, 374 ], [ 374, 375 ], [ 374, 376 ], [ 368, 377 ], [ 377, 378 ], [ 378, 379 ], [ 379, 380 ], [ 380, 381 ], [ 380, 382 ], [ 382, 383 ], [ 379, 384 ], [ 384, 385 ], [ 378, 386 ], [ 386, 387 ], [ 387, 388 ], [ 388, 389 ], [ 389, 390 ], [ 389, 391 ], [ 388, 392 ], [ 392, 393 ], [ 392, 394 ], [ 387, 395 ], [ 395, 396 ], [ 395, 397 ], [ 368, 398 ], [ 398, 399 ], [ 399, 400 ], [ 399, 401 ], [ 398, 402 ], [ 402, 403 ], [ 403, 404 ], [ 403, 405 ], [ 402, 406 ], [ 406, 407 ], [ 406, 408 ], [ 408, 409 ], [ 368, 410 ], [ 410, 411 ], [ 410, 412 ], [ 412, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 415, 417 ], [ 414, 418 ], [ 418, 419 ], [ 418, 420 ], [ 413, 421 ], [ 421, 422 ], [ 422, 423 ], [ 422, 424 ], [ 424, 425 ], [ 425, 426 ], [ 425, 427 ], [ 424, 428 ], [ 428, 429 ], [ 428, 430 ], [ 413, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 433, 435 ], [ 435, 436 ], [ 433, 437 ], [ 412, 438 ], [ 438, 439 ], [ 438, 440 ], [ 440, 441 ], [ 533, 442 ], [ 442, 443 ], [ 442, 444 ], [ 444, 445 ], [ 445, 446 ], [ 445, 447 ], [ 444, 448 ], [ 448, 449 ], [ 444, 450 ], [ 450, 451 ], [ 450, 452 ], [ 444, 453 ], [ 453, 454 ], [ 454, 455 ], [ 455, 456 ], [ 456, 457 ], [ 456, 458 ], [ 458, 459 ], [ 455, 460 ], [ 460, 461 ], [ 454, 462 ], [ 462, 463 ], [ 463, 464 ], [ 464, 465 ], [ 465, 466 ], [ 465, 467 ], [ 464, 468 ], [ 468, 469 ], [ 468, 470 ], [ 463, 471 ], [ 471, 472 ], [ 471, 473 ], [ 444, 474 ], [ 474, 475 ], [ 475, 476 ], [ 475, 477 ], [ 474, 478 ], [ 478, 479 ], [ 479, 480 ], [ 479, 481 ], [ 478, 482 ], [ 482, 483 ], [ 482, 484 ], [ 484, 485 ], [ 444, 486 ], [ 486, 487 ], [ 486, 488 ], [ 488, 489 ], [ 489, 490 ], [ 490, 491 ], [ 491, 492 ], [ 491, 493 ], [ 490, 494 ], [ 494, 495 ], [ 494, 496 ], [ 489, 497 ], [ 497, 498 ], [ 498, 499 ], [ 498, 500 ], [ 500, 501 ], [ 501, 502 ], [ 501, 503 ], [ 500, 504 ], [ 504, 505 ], [ 504, 506 ], [ 489, 507 ], [ 507, 508 ], [ 508, 509 ], [ 509, 510 ], [ 509, 511 ], [ 511, 512 ], [ 509, 513 ], [ 488, 514 ], [ 514, 515 ], [ 514, 516 ], [ 516, 517 ], [ 533, 518 ], [ 518, 519 ], [ 518, 520 ], [ 520, 521 ], [ 521, 522 ], [ 522, 523 ], [ 523, 524 ], [ 523, 525 ], [ 521, 526 ], [ 526, 527 ], [ 527, 528 ], [ 526, 529 ], [ 518, 530 ], [ 530, 531 ], [ 0, 532 ], [ 532, 533 ], [ 532, 534 ] ]
[ "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "import java.io.ByteArrayInputStream;", "ByteArrayInputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "Main", "InputStream is;", "is", "PrintWriter out;", "out", "String INPUT = \"\";", "INPUT", "\"\"", "private byte[] inbuf = new byte[1024];", "inbuf", "new byte[1024]", "1024", "public int lenbuf = 0", "lenbuf", "0", "ptrbuf = 0;", "ptrbuf", "0", "void solve() {\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}", "solve", "{\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}", "int A = ni()", "A", "ni()", "ni", "B = ni()", "B", "ni()", "ni", "C = ni()", "C", "ni()", "ni", "K = ni();", "K", "ni()", "ni", "if(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}", "A >= K", "A", "K", "{\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}", "out.println(K)", "out.println", "out", "K", "return;", "{\n\t\t\tK -= A;\n\t\t}", "K -= A", "K", "A", "if(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;", "B >= K", "B", "K", "{\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}", "out.println(A)", "out.println", "out", "A", "return;", "K-= B", "K", "B", "A -= K", "A", "K", "out.println(A)", "out.println", "out", "A", "void run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "run", "{\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "is", "INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "System.in", "System", "System.in", "new ByteArrayInputStream(INPUT.getBytes())", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "long s = System.currentTimeMillis();", "s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "solve()", "solve", "out.flush()", "out.flush", "out", "if (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");", "!INPUT.isEmpty()", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "tr(System.currentTimeMillis() - s + \"ms\")", "tr", "System.currentTimeMillis() - s + \"ms\"", "System.currentTimeMillis() - s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "s", "\"ms\"", "public static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}", "main", "{\n\t\tnew Main().run();\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "private int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "readByte", "{\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "if (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();", "lenbuf == -1", "lenbuf", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf >= lenbuf", "ptrbuf", "lenbuf", "{\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf = 0", "ptrbuf", "0", "try {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "IOException e", "{\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "throw new InputMismatchException();", "new InputMismatchException()", "{\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t}", "lenbuf = is.read(inbuf)", "lenbuf", "is.read(inbuf)", "is.read", "is", "inbuf", "if (lenbuf <= 0)\n\t\t\t\treturn -1;", "lenbuf <= 0", "lenbuf", "0", "return -1;", "-1", "1", "return inbuf[ptrbuf++];", "inbuf[ptrbuf++]", "inbuf", "ptrbuf++", "ptrbuf", "private boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}", "isSpaceChar", "{\n\t\treturn !(c >= 33 && c <= 126);\n\t}", "return !(c >= 33 && c <= 126);", "!(c >= 33 && c <= 126)", "(c >= 33 && c <= 126)", "c >= 33", "c", "33", "c <= 126", "c", "126", "int c", "c", "private int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "skip", "{\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "int b;", "b", "while ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;", "(b = readByte()) != -1 && isSpaceChar(b)", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "isSpaceChar(b)", "isSpaceChar", "b", "return b;", "b", "private double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}", "nd", "{\n\t\treturn Double.parseDouble(ns());\n\t}", "return Double.parseDouble(ns());", "Double.parseDouble(ns())", "Double.parseDouble", "Double", "ns()", "ns", "private char nc() {\n\t\treturn (char) skip();\n\t}", "nc", "{\n\t\treturn (char) skip();\n\t}", "return (char) skip();", "(char) skip()", "skip", "private String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "ns", "{\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "int b = skip();", "b", "skip()", "skip", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "{ // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "sb.appendCodePoint(b)", "sb.appendCodePoint", "sb", "b", "b = readByte()", "b", "readByte()", "readByte", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "private char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "ns", "{\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "char[] buf = new char[n];", "buf", "new char[n]", "n", "int b = skip()", "b", "skip()", "skip", "p = 0;", "p", "0", "while (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "p < n && !(isSpaceChar(b))", "p < n", "p", "n", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "{\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "buf[p++] = (char) b", "buf[p++]", "buf", "p++", "p", "(char) b", "b = readByte()", "b", "readByte()", "readByte", "return n == p ? buf : Arrays.copyOf(buf, p);", "n == p ? buf : Arrays.copyOf(buf, p)", "n == p", "n", "p", "buf", "Arrays.copyOf(buf, p)", "Arrays.copyOf", "Arrays", "buf", "p", "int n", "n", "private char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "nm", "{\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "char[][] map = new char[n][];", "map", "new char[n][]", "n", "for (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "map[i] = ns(m);", "map[i] = ns(m)", "map[i]", "map", "i", "ns(m)", "ns", "m", "return map;", "map", "int n", "n", "int m", "m", "private int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "na", "{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = ni();", "a[i] = ni()", "a[i]", "a", "i", "ni()", "ni", "return a;", "a", "int n", "n", "private int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "ni", "{\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "int num = 0", "num", "0", "b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "nl", "{\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "long num = 0;", "num", "0", "int b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "tr", "{\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "System.out.println(Arrays.deepToString(o))", "System.out.println", "System.out", "System", "System.out", "Arrays.deepToString(o)", "Arrays.deepToString", "Arrays", "o", "Object... o", "o", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint A = ni(), B = ni(), C = ni(), K = ni();\n\t\tif(A >= K) {\n\t\t\tout.println(K);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tK -= A;\n\t\t}\n\t\tif(B >= K) {\n\t\t\tout.println(A);\n\t\t\treturn;\n\t\t}\n\t\telse K-= B;\n\t\tA -= K;\n\t\tout.println(A);\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "Main" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { InputStream is; PrintWriter out; String INPUT = ""; void solve() { int A = ni(), B = ni(), C = ni(), K = ni(); if(A >= K) { out.println(K); return; } else { K -= A; } if(B >= K) { out.println(A); return; } else K-= B; A -= K; out.println(A); } void run() throws Exception { is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes()); out = new PrintWriter(System.out); long s = System.currentTimeMillis(); solve(); out.flush(); if (!INPUT.isEmpty()) tr(System.currentTimeMillis() - s + "ms"); } public static void main(String[] args) throws Exception { new Main().run(); } private byte[] inbuf = new byte[1024]; public int lenbuf = 0, ptrbuf = 0; private int readByte() { if (lenbuf == -1) throw new InputMismatchException(); if (ptrbuf >= lenbuf) { ptrbuf = 0; try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); } if (lenbuf <= 0) return -1; } return inbuf[ptrbuf++]; } private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); } private int skip() { int b; while ((b = readByte()) != -1 && isSpaceChar(b)) ; return b; } private double nd() { return Double.parseDouble(ns()); } private char nc() { return (char) skip(); } private String ns() { int b = skip(); StringBuilder sb = new StringBuilder(); while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ') sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } private char[] ns(int n) { char[] buf = new char[n]; int b = skip(), p = 0; while (p < n && !(isSpaceChar(b))) { buf[p++] = (char) b; b = readByte(); } return n == p ? buf : Arrays.copyOf(buf, p); } private char[][] nm(int n, int m) { char[][] map = new char[n][]; for (int i = 0; i < n; i++) map[i] = ns(m); return map; } private int[] na(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = ni(); return a; } private int ni() { int num = 0, b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private long nl() { long num = 0; int b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 41, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 34, 38 ], [ 8, 39 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int ak = Math.min(K, A);", "ak", "Math.min(K, A)", "Math.min", "Math", "K", "A", "K -= ak", "K", "ak", "int bk = Math.min(K, B);", "bk", "Math.min(K, B)", "Math.min", "Math", "K", "B", "K -= bk", "K", "bk", "int ck = K;", "ck", "K", "System.out.println(ak - ck)", "System.out.println", "System.out", "System", "System.out", "ak - ck", "ak", "ck", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint ak = Math.min(K, A);\n\t\tK -= ak;\n\t\tint bk = Math.min(K, B);\n\t\tK -= bk;\n\t\tint ck = K;\n\t\tSystem.out.println(ak - ck);\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int ak = Math.min(K, A); K -= ak; int bk = Math.min(K, B); K -= bk; int ck = K; System.out.println(ak - ck); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4, 18, 13, 41, 13, 20, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 106, 8 ], [ 106, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 19, 24 ], [ 13, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 30, 31 ], [ 30, 32 ], [ 13, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 38, 40 ], [ 13, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 46, 48 ], [ 13, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 54, 56 ], [ 13, 57 ], [ 57, 58 ], [ 58, 59 ], [ 13, 60 ], [ 60, 61 ], [ 60, 62 ], [ 13, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 74, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 74, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 13, 100 ], [ 100, 101 ], [ 101, 102 ], [ 9, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }", "main", "{\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }", "try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }", "{\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in))", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in))", "new BufferedReader(new InputStreamReader(System.in))", "String[] tmp = br.readLine().split(\" \");", "tmp", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int a = Integer.parseInt(tmp[0]);", "a", "Integer.parseInt(tmp[0])", "Integer.parseInt", "Integer", "tmp[0]", "tmp", "0", "int b = Integer.parseInt(tmp[1]);", "b", "Integer.parseInt(tmp[1])", "Integer.parseInt", "Integer", "tmp[1]", "tmp", "1", "int c = Integer.parseInt(tmp[2]);", "c", "Integer.parseInt(tmp[2])", "Integer.parseInt", "Integer", "tmp[2]", "tmp", "2", "int k = Integer.parseInt(tmp[3]);", "k", "Integer.parseInt(tmp[3])", "Integer.parseInt", "Integer", "tmp[3]", "tmp", "3", "br.close()", "br.close", "br", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }", "k <= a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }", "k <= a + b", "k", "a + b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(a - (k - a - b));\n }", "System.out.println(a - (k - a - b))", "System.out.println", "System.out", "System", "System.out", "a - (k - a - b)", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "pw.flush()", "pw.flush", "pw", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n \n String[] tmp = br.readLine().split(\" \");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = Integer.parseInt(tmp[2]);\n int k = Integer.parseInt(tmp[3]);\n \n br.close();\n \n PrintWriter pw = new PrintWriter(System.out);\n \n if (k <= a) {\n System.out.println(k);\n } else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - a - b));\n }\n \n pw.flush();\n \n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] tmp = br.readLine().split(" "); int a = Integer.parseInt(tmp[0]); int b = Integer.parseInt(tmp[1]); int c = Integer.parseInt(tmp[2]); int k = Integer.parseInt(tmp[3]); br.close(); PrintWriter pw = new PrintWriter(System.out); if (k <= a) { System.out.println(k); } else if (k <= a + b) { System.out.println(a); } else { System.out.println(a - (k - a - b)); } pw.flush(); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 70, 5 ], [ 70, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 43, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 8, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 6, 67 ], [ 67, 68 ], [ 0, 69 ], [ 69, 70 ], [ 69, 71 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int A = scan.nextInt();", "A", "scan.nextInt()", "scan.nextInt", "scan", "int B = scan.nextInt();", "B", "scan.nextInt()", "scan.nextInt", "scan", "int C = scan.nextInt();", "C", "scan.nextInt()", "scan.nextInt", "scan", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int S = 0;", "S", "0", "if(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}", "A >= K", "A", "K", "{\n\t\t\tS = K;\n\t\t}", "S = K", "S", "K", "{\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}", "S = A", "S", "A", "K -= A", "K", "A", "K -= B", "K", "B", "if(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}", "K > 0", "K", "0", "{\n\t\t\t\tS -= K;\n\t\t\t}", "S -= K", "S", "K", "System.out.println(S)", "System.out.println", "System.out", "System", "System.out", "S", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint S = 0;\n\n\t\tif(A >= K) {\n\t\t\tS = K;\n\t\t} else {\n\t\t\tS = A;\n\t\t\tK -= A;\n\t\t\tK -= B;\n\t\t\tif(K > 0) {\n\t\t\t\tS -= K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); int C = scan.nextInt(); int K = scan.nextInt(); int S = 0; if(A >= K) { S = K; } else { S = A; K -= A; K -= B; if(K > 0) { S -= K; } } System.out.println(S); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 13, 2, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 8, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 8, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 56, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 67, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 67, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 8, 93 ], [ 93, 94 ], [ 94, 95 ], [ 6, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "String A = scan.next();", "A", "scan.next()", "scan.next", "scan", "String B = scan.next();", "B", "scan.next()", "scan.next", "scan", "String C = scan.next();", "C", "scan.next()", "scan.next", "scan", "String K = scan.next();", "K", "scan.next()", "scan.next", "scan", "int a = Integer.parseInt(A);", "a", "Integer.parseInt(A)", "Integer.parseInt", "Integer", "A", "int b = Integer.parseInt(B);", "b", "Integer.parseInt(B)", "Integer.parseInt", "Integer", "B", "int c = Integer.parseInt(C);", "c", "Integer.parseInt(C)", "Integer.parseInt", "Integer", "C", "int k = Integer.parseInt(K);", "k", "Integer.parseInt(K)", "Integer.parseInt", "Integer", "K", "if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }", "k < a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }", "k <= a + b", "k", "a + b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(a - (k - (a + b)));\n }", "System.out.println(a - (k - (a + b)))", "System.out.println", "System.out", "System", "System.out", "a - (k - (a + b))", "a", "(k - (a + b))", "k", "(a + b)", "a", "b", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String A = scan.next();\n String B = scan.next();\n String C = scan.next();\n String K = scan.next();\n int a = Integer.parseInt(A);\n int b = Integer.parseInt(B);\n int c = Integer.parseInt(C);\n int k = Integer.parseInt(K);\n \n if (k < a) {\n System.out.println(k);\n }\n else if (k <= a + b) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n \n scan.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String A = scan.next(); String B = scan.next(); String C = scan.next(); String K = scan.next(); int a = Integer.parseInt(A); int b = Integer.parseInt(B); int c = Integer.parseInt(C); int k = Integer.parseInt(K); if (k < a) { System.out.println(k); } else if (k <= a + b) { System.out.println(a); } else { System.out.println(a - (k - (a + b))); } scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 13, 0, 13, 8, 2, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 18, 13, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 14, 2, 13, 13, 30, 29, 17, 30, 0, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 29, 17, 29, 17, 12, 13, 30, 14, 4, 13, 29, 18, 13, 40, 13, 29, 40, 17, 12, 13, 30, 29, 2, 2, 17, 13, 2, 13, 17, 23, 13, 12, 13, 30, 42, 2, 4, 13, 40, 4, 13, 18, 13, 13, 40, 13, 29, 4, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 41, 13, 20, 41, 13, 4, 13, 42, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 14, 2, 2, 13, 17, 2, 17, 13, 30, 37, 20, 42, 17, 30, 14, 2, 2, 17, 13, 2, 13, 17, 30, 0, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 13, 40, 17, 40, 4, 13, 13, 30, 29, 8, 13, 40, 13, 13, 30, 37, 20, 0, 13, 4, 13, 12, 13, 30, 41, 13, 4, 13, 14, 2, 2, 13, 18, 13, 13, 2, 13, 18, 13, 13, 37, 20, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 343, 11 ], [ 343, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 14, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 14, 38 ], [ 38, 39 ], [ 38, 40 ], [ 14, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 45, 52 ], [ 41, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 14, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 64, 71 ], [ 60, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 14, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 78, 83 ], [ 14, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 12, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 92, 99 ], [ 99, 100 ], [ 99, 101 ], [ 92, 103 ], [ 103, 104 ], [ 103, 105 ], [ 92, 106 ], [ 106, 107 ], [ 106, 108 ], [ 92, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 117, 118 ], [ 112, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 123, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 119, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 141, 142 ], [ 142, 143 ], [ 111, 144 ], [ 144, 145 ], [ 92, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 149, 157 ], [ 157, 158 ], [ 158, 159 ], [ 92, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 168, 169 ], [ 168, 170 ], [ 160, 171 ], [ 171, 172 ], [ 92, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 177, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 183, 185 ], [ 176, 186 ], [ 186, 187 ], [ 175, 188 ], [ 188, 189 ], [ 189, 190 ], [ 92, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 194, 198 ], [ 198, 199 ], [ 193, 200 ], [ 200, 201 ], [ 200, 202 ], [ 193, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 193, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 207, 211 ], [ 211, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 211, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 193, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 92, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 227, 231 ], [ 231, 232 ], [ 226, 233 ], [ 233, 234 ], [ 233, 235 ], [ 226, 236 ], [ 236, 237 ], [ 236, 238 ], [ 226, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 226, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 243, 247 ], [ 247, 248 ], [ 248, 249 ], [ 248, 250 ], [ 247, 251 ], [ 251, 252 ], [ 251, 253 ], [ 253, 254 ], [ 226, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 256, 260 ], [ 260, 261 ], [ 260, 262 ], [ 255, 263 ], [ 263, 264 ], [ 264, 265 ], [ 226, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 270, 274 ], [ 274, 275 ], [ 274, 276 ], [ 269, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 277, 281 ], [ 281, 282 ], [ 281, 283 ], [ 283, 284 ], [ 283, 285 ], [ 269, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 287, 292 ], [ 292, 293 ], [ 293, 294 ], [ 293, 295 ], [ 286, 296 ], [ 296, 297 ], [ 297, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 298, 302 ], [ 286, 303 ], [ 303, 304 ], [ 304, 305 ], [ 268, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 92, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 313, 314 ], [ 313, 315 ], [ 315, 316 ], [ 312, 317 ], [ 317, 318 ], [ 318, 319 ], [ 319, 320 ], [ 319, 321 ], [ 321, 322 ], [ 321, 323 ], [ 318, 324 ], [ 324, 325 ], [ 324, 326 ], [ 326, 327 ], [ 326, 328 ], [ 317, 329 ], [ 329, 330 ], [ 312, 331 ], [ 331, 332 ], [ 92, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 337, 340 ], [ 340, 341 ], [ 0, 342 ], [ 342, 343 ], [ 342, 344 ] ]
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.NoSuchElementException;\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}\n\n}\n\nclass FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n public double nextDouble() { return Double.parseDouble(next());}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.util.NoSuchElementException;", "NoSuchElementException", "java.util", "public class Main {\n\n\tpublic static void main(String[] args){\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main", "public static void main(String[] args){\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}", "main", "{\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}", "FastScanner sc = new FastScanner();", "sc", "new FastScanner()", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int score = 0;", "score", "0", "if(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}", "a >= k", "a", "k", "{\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "return;", "{\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}", "k -= a", "k", "a", "score += a", "score", "a", "if(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}", "b >= k", "b", "k", "{\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "return;", "{\n\t\t\tk -= b;\n\t\t}", "k -= b", "k", "b", "score -= (k >= c) ? c : k", "score", "(k >= c) ? c : k", "(k >= c)", "k", "c", "c", "k", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "String[] args", "args", "class FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n public double nextDouble() { return Double.parseDouble(next());}\n}", "FastScanner", "private final InputStream in = System.in;", "in", "System.in", "System", "System.in", "private final byte[] buffer = new byte[1024];", "buffer", "new byte[1024]", "1024", "private int ptr = 0;", "ptr", "0", "private int buflen = 0;", "buflen", "0", "private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }", "hasNextByte", "{\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }", "if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }", "ptr < buflen", "ptr", "buflen", "{\n return true;\n }", "return true;", "true", "{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }", "ptr = 0", "ptr", "0", "try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n buflen = in.read(buffer);\n }", "buflen = in.read(buffer)", "buflen", "in.read(buffer)", "in.read", "in", "buffer", "if (buflen <= 0) {\n return false;\n }", "buflen <= 0", "buflen", "0", "{\n return false;\n }", "return false;", "false", "return true;", "true", "private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}", "readByte", "{ if (hasNextByte()) return buffer[ptr++]; else return -1;}", "if (hasNextByte()) return buffer[ptr++]; else return -1;", "hasNextByte()", "hasNextByte", "return buffer[ptr++];", "buffer[ptr++]", "buffer", "ptr++", "ptr", "return -1;", "-1", "1", "private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}", "isPrintableChar", "{ return 33 <= c && c <= 126;}", "return 33 <= c && c <= 126;", "33 <= c && c <= 126", "33 <= c", "33", "c", "c <= 126", "c", "126", "int c", "c", "public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}", "hasNext", "{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}", "while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;", "hasNextByte() && !isPrintableChar(buffer[ptr])", "hasNextByte()", "hasNextByte", "!isPrintableChar(buffer[ptr])", "isPrintableChar(buffer[ptr])", "isPrintableChar", "buffer[ptr]", "buffer", "ptr", "ptr++", "ptr", "return hasNextByte();", "hasNextByte()", "hasNextByte", "public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }", "next", "{\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int b = readByte();", "b", "readByte()", "readByte", "while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }", "isPrintableChar(b)", "isPrintableChar", "b", "{\n sb.appendCodePoint(b);\n b = readByte();\n }", "sb.appendCodePoint(b)", "sb.appendCodePoint", "sb", "b", "b = readByte()", "b", "readByte()", "readByte", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }", "nextLong", "{\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "long n = 0;", "n", "0", "boolean minus = false;", "minus", "false", "int b = readByte();", "b", "readByte()", "readByte", "if (b == '-') {\n minus = true;\n b = readByte();\n }", "b == '-'", "b", "'-'", "{\n minus = true;\n b = readByte();\n }", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }", "b < '0' || '9' < b", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "{\n throw new NumberFormatException();\n }", "throw new NumberFormatException();", "new NumberFormatException()", "while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }", "true", "{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }", "if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }", "'0' <= b && b <= '9'", "'0' <= b", "'0'", "b", "b <= '9'", "b", "'9'", "{\n n *= 10;\n n += b - '0';\n }", "n *= 10", "n", "10", "n += b - '0'", "n", "b - '0'", "b", "'0'", "if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }", "b == -1 || !isPrintableChar(b)", "b == -1", "b", "-1", "1", "!isPrintableChar(b)", "isPrintableChar(b)", "isPrintableChar", "b", "{\n return minus ? -n : n;\n }", "return minus ? -n : n;", "minus ? -n : n", "minus", "-n", "n", "n", "{\n throw new NumberFormatException();\n }", "throw new NumberFormatException();", "new NumberFormatException()", "b = readByte()", "b", "readByte()", "readByte", "public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }", "nextInt", "{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }", "long nl = nextLong();", "nl", "nextLong()", "nextLong", "if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();", "nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE", "nl < Integer.MIN_VALUE", "nl", "Integer.MIN_VALUE", "Integer", "Integer.MIN_VALUE", "nl > Integer.MAX_VALUE", "nl", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "throw new NumberFormatException();", "new NumberFormatException()", "return (int) nl;", "(int) nl", "public double nextDouble() { return Double.parseDouble(next());}", "nextDouble", "{ return Double.parseDouble(next());}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main {\n\n\tpublic static void main(String[] args){\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args){\n\t\tFastScanner sc = new FastScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\tif(a >= k) {\n\t\t\tSystem.out.println(k);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= a;\n\t\t\tscore += a;\n\t\t}\n\t\t\n\t\tif(b >= k) {\n\t\t\tSystem.out.println(score);\n\t\t\treturn;\n\t\t}else {\n\t\t\tk -= b;\n\t\t}\n\t\t\n\t\tscore -= (k >= c) ? c : k;\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main" ]
import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; public class Main { public static void main(String[] args){ FastScanner sc = new FastScanner(); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int score = 0; if(a >= k) { System.out.println(k); return; }else { k -= a; score += a; } if(b >= k) { System.out.println(score); return; }else { k -= b; } score -= (k >= c) ? c : k; System.out.println(score); } } class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolean hasNextByte() { if (ptr < buflen) { return true; }else{ ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;} private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;} public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();} public String next() { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while(isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { if (!hasNext()) throw new NoSuchElementException(); long n = 0; boolean minus = false; int b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while(true){ if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; }else if(b == -1 || !isPrintableChar(b)){ return minus ? -n : n; }else{ throw new NumberFormatException(); } b = readByte(); } } public int nextInt() { long nl = nextLong(); if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 2, 17, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 42, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 42, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 59, 65 ], [ 6, 66 ], [ 66, 67 ] ]
[ "import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args){\n Scanner sr = new Scanner(System.in);\n int A = sr.nextInt();\n int B = sr.nextInt();\n int C = sr.nextInt();\n int K = sr.nextInt();\n //System.out.print(A +\"\"+ B +\"\"+C+ \"\"+K );\n if ( K <= A)\n System.out.print(K);\n else\n if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K); \n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\tpublic static void main(String[] args){\n Scanner sr = new Scanner(System.in);\n int A = sr.nextInt();\n int B = sr.nextInt();\n int C = sr.nextInt();\n int K = sr.nextInt();\n //System.out.print(A +\"\"+ B +\"\"+C+ \"\"+K );\n if ( K <= A)\n System.out.print(K);\n else\n if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K); \n }\n}", "Main", "public static void main(String[] args){\n Scanner sr = new Scanner(System.in);\n int A = sr.nextInt();\n int B = sr.nextInt();\n int C = sr.nextInt();\n int K = sr.nextInt();\n //System.out.print(A +\"\"+ B +\"\"+C+ \"\"+K );\n if ( K <= A)\n System.out.print(K);\n else\n if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K); \n }", "main", "{\n Scanner sr = new Scanner(System.in);\n int A = sr.nextInt();\n int B = sr.nextInt();\n int C = sr.nextInt();\n int K = sr.nextInt();\n //System.out.print(A +\"\"+ B +\"\"+C+ \"\"+K );\n if ( K <= A)\n System.out.print(K);\n else\n if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K); \n }", "Scanner sr = new Scanner(System.in);", "sr", "new Scanner(System.in)", "int A = sr.nextInt();", "A", "sr.nextInt()", "sr.nextInt", "sr", "int B = sr.nextInt();", "B", "sr.nextInt()", "sr.nextInt", "sr", "int C = sr.nextInt();", "C", "sr.nextInt()", "sr.nextInt", "sr", "int K = sr.nextInt();", "K", "sr.nextInt()", "sr.nextInt", "sr", "if ( K <= A)\n System.out.print(K);\n else\n if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K);", "K <= A", "K", "A", "System.out.print(K)", "System.out.print", "System.out", "System", "System.out", "K", "if(K <= A+B)\n System.out.print(A);\n else\n System.out.print(2*A+B-K);", "K <= A+B", "K", "A+B", "A", "B", "System.out.print(A)", "System.out.print", "System.out", "System", "System.out", "A", "System.out.print(2*A+B-K)", "System.out.print", "System.out", "System", "System.out", "2*A+B-K", "2*A+B", "2*A", "2", "A", "B", "K", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sr = new Scanner(System.in); int A = sr.nextInt(); int B = sr.nextInt(); int C = sr.nextInt(); int K = sr.nextInt(); //System.out.print(A +""+ B +""+C+ ""+K ); if ( K <= A) System.out.print(K); else if(K <= A+B) System.out.print(A); else System.out.print(2*A+B-K); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long A = sc.nextLong();", "A", "sc.nextLong()", "sc.nextLong", "sc", "long B = sc.nextLong();", "B", "sc.nextLong()", "sc.nextLong", "sc", "long C = sc.nextLong();", "C", "sc.nextLong()", "sc.nextLong", "sc", "long K = sc.nextLong();", "K", "sc.nextLong()", "sc.nextLong", "sc", "long sum = 0;", "sum", "0", "if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }", "K<A", "K", "A", "{\n sum = K;\n }", "sum = K", "sum", "K", "if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }", "K<=A+B", "K", "A+B", "A", "B", "{\n sum = A;\n }", "sum = A", "sum", "A", "{\n sum = A - (K-A-B);\n }", "sum = A - (K-A-B)", "sum", "A - (K-A-B)", "A", "(K-A-B)", "K-A-B", "K", "A", "B", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long A = sc.nextLong();\n long B = sc.nextLong();\n long C = sc.nextLong();\n long K = sc.nextLong();\n long sum = 0;\n \n if(K<A){\n sum = K;\n }\n else if(K<=A+B){\n sum = A;\n }\n \n else{\n sum = A - (K-A-B);\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); long C = sc.nextLong(); long K = sc.nextLong(); long sum = 0; if(K<A){ sum = K; } else if(K<=A+B){ sum = A; } else{ sum = A - (K-A-B); } System.out.println(sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 13, 17, 30, 14, 2, 13, 17, 30, 40, 13, 40, 13, 0, 13, 17, 14, 2, 13, 17, 30, 40, 13, 40, 13, 14, 2, 13, 17, 30, 40, 13, 40, 13, 0, 13, 17, 30, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 90, 11 ], [ 90, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 14, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 14, 38 ], [ 38, 39 ], [ 38, 40 ], [ 14, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 46, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 58, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 67, 79 ], [ 79, 80 ], [ 14, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 12, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.*;\nimport java.io.*;\nimport java.lang.*;\n\npublic class Main {\n\tpublic static void main (String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main {\n\tpublic static void main (String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}\n}", "Main", "public static void main (String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int value = 0;", "value", "0", "while (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "k > 0", "k", "0", "{\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}", "a!=0", "a", "0", "{\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t}", "a--", "a", "k--", "k", "value+=1", "value", "1", "if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}", "b != 0", "b", "0", "{\n\t\t\t\tb--; k--; ;\n\t\t\t}", "b--", "b", "k--", "k", "if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}", "c != 0", "c", "0", "{\n\t\t\t\tc--; k--; value-=1;\n\t\t\t}", "c--", "c", "k--", "k", "value-=1", "value", "1", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "System.out.println(value)", "System.out.println", "System.out", "System", "System.out", "value", "String[] args", "args", "public class Main {\n\tpublic static void main (String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}\n}", "public class Main {\n\tpublic static void main (String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\t\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint value = 0;\n\t\twhile (k > 0) {\n\t\t\tif (a!=0) {\n\t\t\t\ta--;\n\t\t\t\tk--; \n\t\t\t\tvalue+=1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--; k--; ;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--; k--; value-=1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(value);\n\t}\n}", "Main" ]
import java.util.*; import java.io.*; import java.lang.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int value = 0; while (k > 0) { if (a!=0) { a--; k--; value+=1; } else if (b != 0) { b--; k--; ; } else if (c != 0) { c--; k--; value-=1; } else { break; } } System.out.println(value); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 2, 13, 17, 2, 13, 17, 30, 40, 13, 0, 13, 17, 0, 13, 17, 42, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 17, 0, 13, 17, 42, 2, 2, 13, 17, 2, 13, 17, 30, 40, 13, 0, 13, 17, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 8, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 6, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int score = 0;", "score", "0", "while(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}", "a > 0 && k > 0", "a > 0", "a", "0", "k > 0", "k", "0", "{\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}", "score++", "score", "k -= 1", "k", "1", "a -= 1", "a", "1", "while(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}", "b > 0 && k > 0", "b > 0", "b", "0", "k > 0", "k", "0", "{\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}", "k -= 1", "k", "1", "b -= 1", "b", "1", "while(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}", "c > 0 && k > 0", "c > 0", "c", "0", "k > 0", "k", "0", "{\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}", "score--", "score", "k -= 1", "k", "1", "c -= 1", "c", "1", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint score = 0;\n\t\t\n\t\twhile(a > 0 && k > 0) {\n\t\t\tscore++;\n\t\t\tk -= 1;\n\t\t\ta -= 1;\n\t\t}\n\t\twhile(b > 0 && k > 0) {\n\t\t\tk -= 1;\n\t\t\tb -= 1;\n\t\t}\n\t\twhile(c > 0 && k > 0) {\n\t\t\tscore--;\n\t\t\tk -= 1;\n\t\t\tc -= 1;\n\t\t}\n\t\tSystem.out.println(score);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int score = 0; while(a > 0 && k > 0) { score++; k -= 1; a -= 1; } while(b > 0 && k > 0) { k -= 1; b -= 1; } while(c > 0 && k > 0) { score--; k -= 1; c -= 1; } System.out.println(score); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 53, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 8, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 6, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int A = scan.nextInt();", "A", "scan.nextInt()", "scan.nextInt", "scan", "int B = scan.nextInt();", "B", "scan.nextInt()", "scan.nextInt", "scan", "int C = scan.nextInt();", "C", "scan.nextInt()", "scan.nextInt", "scan", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "if(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}", "A > K", "A", "K", "{\n\t\t\tsum += K;\n\t\t}", "sum += K", "sum", "K", "if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}", "A+B >= K", "A+B", "A", "B", "K", "{\n\t\t\tsum += A;\n\t\t}", "sum += A", "sum", "A", "{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}", "K -= A+B", "K", "A+B", "A", "B", "sum += (A - K)", "sum", "(A - K)", "A", "K", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint sum = 0;\n\n\t\tif(A > K){\n\t\t\tsum += K;\n\t\t}else if(A+B >= K){\n\t\t\tsum += A;\n\t\t}else{\n\t\t\tK -= A+B;\n\t\t\tsum += (A - K);\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t\tscan.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); int C = scan.nextInt(); int K = scan.nextInt(); int sum = 0; if(A > K){ sum += K; }else if(A+B >= K){ sum += A; }else{ K -= A+B; sum += (A - K); } System.out.println(sum); scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 17, 0, 13, 2, 13, 13, 14, 2, 40, 13, 2, 13, 13, 30, 0, 13, 13, 0, 13, 17, 0, 13, 2, 13, 13, 14, 2, 40, 13, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 2, 40, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 100, 5 ], [ 100, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 54, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 65, 66 ], [ 65, 67 ], [ 8, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 73, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 8, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 6, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.Scanner;\n\n/*\n問題文\n\n*/\n\npublic class Main {\n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }", "main", "{\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "long b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "long c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "long k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "boolean flg = false;", "flg", "false", "if (k <= a) {\n ans = k;\n flg = true;\n }", "k <= a", "k", "a", "{\n ans = k;\n flg = true;\n }", "ans = k", "ans", "k", "flg = true", "flg", "true", "k = k-a", "k", "k-a", "k", "a", "if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }", "!flg && k <= b", "!flg", "flg", "k <= b", "k", "b", "{\n ans = a;\n flg = true;\n }", "ans = a", "ans", "a", "flg = true", "flg", "true", "k = k-b", "k", "k-b", "k", "b", "if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }", "!flg && k-c <= 0", "!flg", "flg", "k-c <= 0", "k-c", "k", "c", "0", "{\n ans = a + (-1 * k);\n }", "ans = a + (-1 * k)", "ans", "a + (-1 * k)", "a", "(-1 * k)", "-1", "1", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n long a = sc.nextInt();\n long b = sc.nextInt();\n long c = sc.nextInt();\n long k = sc.nextInt();\n\n long ans = 0;\n boolean flg = false;\n if (k <= a) {\n ans = k;\n flg = true;\n }\n\n k = k-a;\n\n if ( !flg && k <= b) {\n ans = a;\n flg = true;\n }\n\n k = k-b;\n\n if (!flg && k-c <= 0) {\n ans = a + (-1 * k);\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; /* 問題文 */ public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); long a = sc.nextInt(); long b = sc.nextInt(); long c = sc.nextInt(); long k = sc.nextInt(); long ans = 0; boolean flg = false; if (k <= a) { ans = k; flg = true; } k = k-a; if ( !flg && k <= b) { ans = a; flg = true; } k = k-b; if (!flg && k-c <= 0) { ans = a + (-1 * k); } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 39, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 39, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 35, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 8, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 6, 70 ], [ 70, 71 ] ]
[ "import java.util.*;\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int ans = 0;\n if(a < k){\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }\n else{\n ans = k;\n }\n System.out.println(ans);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int ans = 0;\n if(a < k){\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }\n else{\n ans = k;\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int ans = 0;\n if(a < k){\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }\n else{\n ans = k;\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int ans = 0;\n if(a < k){\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }\n else{\n ans = k;\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "if(a < k){\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }\n else{\n ans = k;\n }", "a < k", "a", "k", "{\n ans += a;\n k = k-a;\n k = k - b;\n if(k > 0) ans -= k;\n }", "ans += a", "ans", "a", "k = k-a", "k", "k-a", "k", "a", "k = k - b", "k", "k - b", "k", "b", "if(k > 0) ans -= k;", "k > 0", "k", "0", "ans -= k", "ans", "k", "{\n ans = k;\n }", "ans = k", "ans", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String args[]", "args" ]
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int ans = 0; if(a < k){ ans += a; k = k-a; k = k - b; if(k > 0) ans -= k; } else{ ans = k; } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 13, 13, 29, 30, 4, 18, 18, 13, 13, 2, 2, 13, 13, 2, 2, 2, 13, 13, 13, 17, 29, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 39, 46 ], [ 35, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 53, 64 ], [ 47, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 72, 72 ], [ 72, 73 ], [ 72, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 75, 81 ], [ 65, 82 ], [ 6, 83 ], [ 83, 84 ] ]
[ "import java.util.*;\nclass Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long c = scanner.nextLong();\n long k = scanner.nextLong();\n long ans = k;\n if(k <= a){System.out.println(ans);return;}\n else if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}\n }\n}\n", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long c = scanner.nextLong();\n long k = scanner.nextLong();\n long ans = k;\n if(k <= a){System.out.println(ans);return;}\n else if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long c = scanner.nextLong();\n long k = scanner.nextLong();\n long ans = k;\n if(k <= a){System.out.println(ans);return;}\n else if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long c = scanner.nextLong();\n long k = scanner.nextLong();\n long ans = k;\n if(k <= a){System.out.println(ans);return;}\n else if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "long a = scanner.nextLong();", "a", "scanner.nextLong()", "scanner.nextLong", "scanner", "long b = scanner.nextLong();", "b", "scanner.nextLong()", "scanner.nextLong", "scanner", "long c = scanner.nextLong();", "c", "scanner.nextLong()", "scanner.nextLong", "scanner", "long k = scanner.nextLong();", "k", "scanner.nextLong()", "scanner.nextLong", "scanner", "long ans = k;", "ans", "k", "if(k <= a){System.out.println(ans);return;}\n else if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}", "k <= a", "k", "a", "{System.out.println(ans);return;}", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "return;", "if(k <= a+b){System.out.println(ans-(k-a));return;}\n else{System.out.println(ans-b-(k-a-b)*2);return;}", "k <= a+b", "k", "a+b", "a", "b", "{System.out.println(ans-(k-a));return;}", "System.out.println(ans-(k-a))", "System.out.println", "System.out", "System", "System.out", "ans-(k-a)", "ans", "(k-a)", "k", "a", "return;", "{System.out.println(ans-b-(k-a-b)*2);return;}", "System.out.println(ans-b-(k-a-b)*2)", "System.out.println", "System.out", "System", "System.out", "ans-b-(k-a-b)*2", "ans-b-(k-a-b)*2", "ans", "b", "(k-a-b)*2", "(k-a-b)", "k-a-b", "k", "a", "b", "2", "return;", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); long a = scanner.nextLong(); long b = scanner.nextLong(); long c = scanner.nextLong(); long k = scanner.nextLong(); long ans = k; if(k <= a){System.out.println(ans);return;} else if(k <= a+b){System.out.println(ans-(k-a));return;} else{System.out.println(ans-b-(k-a-b)*2);return;} } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 2, 13, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 13, 2, 2, 2, 13, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 59, 59 ], [ 59, 60 ], [ 59, 61 ], [ 59, 62 ], [ 57, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 74, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }", "A >= K", "A", "K", "{\n System.out.println(K);\n }", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }", "A + B >= K", "A + B", "A", "B", "K", "{\n System.out.println(A);\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }", "A + B + C >= K", "A + B + C", "A + B + C", "A", "B", "C", "K", "{\n System.out.println(A - (C - ((A + B + C) - K)));\n }", "System.out.println(A - (C - ((A + B + C) - K)))", "System.out.println", "System.out", "System", "System.out", "A - (C - ((A + B + C) - K))", "A", "(C - ((A + B + C) - K))", "C", "((A + B + C) - K)", "(A + B + C)", "A + B + C", "A", "B", "C", "K", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if (A >= K) {\n System.out.println(K);\n } else if (A + B >= K) {\n System.out.println(A);\n } else if (A + B + C >= K) {\n System.out.println(A - (C - ((A + B + C) - K)));\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); if (A >= K) { System.out.println(K); } else if (A + B >= K) { System.out.println(A); } else if (A + B + C >= K) { System.out.println(A - (C - ((A + B + C) - K))); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 17, 14, 2, 13, 17, 30, 0, 13, 8, 2, 13, 13, 13, 13, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 17, 4, 18, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 199, 8 ], [ 199, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 14, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 19, 21 ], [ 11, 22 ], [ 22, 23 ], [ 22, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 31, 35 ], [ 11, 36 ], [ 36, 37 ], [ 37, 38 ], [ 9, 39 ], [ 39, 40 ], [ 199, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 45, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 45, 66 ], [ 66, 67 ], [ 66, 68 ], [ 45, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 74, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 45, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 99, 104 ], [ 45, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 110, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 125, 126 ], [ 125, 127 ], [ 45, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 43, 132 ], [ 132, 133 ], [ 43, 134 ], [ 134, 135 ], [ 199, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 136, 140 ], [ 140, 141 ], [ 136, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 148, 149 ], [ 148, 150 ], [ 142, 151 ], [ 151, 152 ], [ 136, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 156, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 166, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 155, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 136, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 187, 188 ], [ 136, 189 ], [ 189, 190 ], [ 189, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 193, 196 ], [ 196, 197 ], [ 0, 198 ], [ 198, 199 ], [ 198, 200 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n\n static class Task {\n public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }\n\n \n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong(){\n return Long.parseLong(next());\n }\n\n }\n}\n", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n\n static class Task {\n public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }\n\n \n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong(){\n return Long.parseLong(next());\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "InputReader in = new InputReader(inputStream);", "in", "new InputReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "Task solver = new Task();", "solver", "new Task()", "solver.solve(in, out)", "solver.solve", "solver", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class Task {\n public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }\n\n \n }", "Task", "public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }", "solve", "{\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }", "long a = in.nextLong();", "a", "in.nextLong()", "in.nextLong", "in", "long b = in.nextLong();", "b", "in.nextLong()", "in.nextLong", "in", "long c = in.nextLong();", "c", "in.nextLong()", "in.nextLong", "in", "long k = in.nextLong();", "k", "in.nextLong()", "in.nextLong", "in", "long resultSum = 0;", "resultSum", "0", "if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }", "k > 0", "k", "0", "{\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }", "if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }", "k > a", "k", "a", "{\n resultSum += a;\n k -= a;\n }", "resultSum += a", "resultSum", "a", "k -= a", "k", "a", "{\n resultSum += k;\n k = 0;\n }", "resultSum += k", "resultSum", "k", "k = 0", "k", "0", "if(k > 0){\n k -= (k > b)? b : k;\n }", "k > 0", "k", "0", "{\n k -= (k > b)? b : k;\n }", "k -= (k > b)? b : k", "k", "(k > b)? b : k", "(k > b)", "k", "b", "b", "k", "if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }", "k > 0", "k", "0", "{\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }", "if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }", "k > c", "k", "c", "{\n resultSum -= c;\n k -= c;\n }", "resultSum -= c", "resultSum", "c", "k -= c", "k", "c", "{\n resultSum -= k;\n k = 0;\n }", "resultSum -= k", "resultSum", "k", "k = 0", "k", "0", "out.println(resultSum)", "out.println", "out", "resultSum", "InputReader in", "in", "PrintWriter out", "out", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong(){\n return Long.parseLong(next());\n }\n\n }", "InputReader", "public BufferedReader reader;", "reader", "public StringTokenizer tokenizer;", "tokenizer", "public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "InputReader", "{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(stream), 32768)", "reader", "new BufferedReader(new InputStreamReader(stream), 32768)", "tokenizer = null", "tokenizer", "null", "InputStream stream", "stream", "public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "next", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public long nextLong(){\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n\n static class Task {\n public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }\n\n \n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong(){\n return Long.parseLong(next());\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n\n static class Task {\n public void solve(InputReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long resultSum = 0;\n if(k > 0){\n if(k > a){\n resultSum += a;\n k -= a;\n }\n else{\n resultSum += k;\n k = 0;\n }\n }\n if(k > 0){\n k -= (k > b)? b : k;\n }\n\n if(k > 0){\n if(k > c){\n resultSum -= c;\n k -= c;\n }\n else{\n resultSum -= k;\n k = 0;\n }\n }\n out.println(resultSum);\n }\n\n \n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong(){\n return Long.parseLong(next());\n }\n\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(in, out); out.close(); } static class Task { public void solve(InputReader in, PrintWriter out) { long a = in.nextLong(); long b = in.nextLong(); long c = in.nextLong(); long k = in.nextLong(); long resultSum = 0; if(k > 0){ if(k > a){ resultSum += a; k -= a; } else{ resultSum += k; k = 0; } } if(k > 0){ k -= (k > b)? b : k; } if(k > 0){ if(k > c){ resultSum -= c; k -= c; } else{ resultSum -= k; k = 0; } } out.println(resultSum); } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong(){ return Long.parseLong(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 2, 2, 17, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 62, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }", "k < a", "k", "a", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }", "k <= a + b", "k", "a + b", "a", "b", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(2 * a + b - k);\n }", "System.out.println(2 * a + b - k)", "System.out.println", "System.out", "System", "System.out", "2 * a + b - k", "2 * a + b", "2 * a", "2", "a", "b", "k", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(k < a){\n System.out.println(k);\n }else if(k <= a + b){\n System.out.println(a);\n }else{\n System.out.println(2 * a + b - k);\n }\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); if(k < a){ System.out.println(k); }else if(k <= a + b){ System.out.println(a); }else{ System.out.println(2 * a + b - k); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 89, 5 ], [ 89, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 60, 60 ], [ 60, 61 ], [ 60, 62 ], [ 60, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 56, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 6, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }\n}", "Main", "public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }", "K<=A", "K", "A", "{\n System.out.println(K);\n }", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }", "K<=A+B", "K", "A+B", "A", "B", "{\n\tSystem.out.println(A);\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }", "K<A+B+C", "K", "A+B+C", "A+B+C", "A", "B", "C", "{\n System.out.println(A-(K-A-B));\n }", "System.out.println(A-(K-A-B))", "System.out.println", "System.out", "System", "System.out", "A-(K-A-B)", "A", "(K-A-B)", "K-A-B", "K", "A", "B", "{\n\tSystem.out.println(A-C);\t\n }", "System.out.println(A-C)", "System.out.println", "System.out", "System", "System.out", "A-C", "A", "C", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n \n if(K<=A){\n System.out.println(K);\n }else if(K<=A+B){\n\tSystem.out.println(A);\n }else if(K<A+B+C){\n System.out.println(A-(K-A-B));\n }else{\n\tSystem.out.println(A-C);\t\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); if(K<=A){ System.out.println(K); }else if(K<=A+B){ System.out.println(A); }else if(K<A+B+C){ System.out.println(A-(K-A-B)); }else{ System.out.println(A-C); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 41, 13, 13, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 34, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 44, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 49, 53 ], [ 8, 54 ], [ 54, 55 ], [ 54, 56 ], [ 8, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 59, 63 ], [ 8, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 67, 69 ], [ 8, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.Scanner;\n\n\n\npublic class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = Integer.parseInt(sc.next());", "a", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int b = Integer.parseInt(sc.next());", "b", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int c = Integer.parseInt(sc.next());", "c", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int k = Integer.parseInt(sc.next());", "k", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int sum = 0;", "sum", "0", "int xa = Math.min(a,k);", "xa", "Math.min(a,k)", "Math.min", "Math", "a", "k", "k -= xa", "k", "xa", "int xb = Math.min(b, k);", "xb", "Math.min(b, k)", "Math.min", "Math", "b", "k", "k -= xb", "k", "xb", "int xc = k;", "xc", "k", "sum = xa - xc", "sum", "xa - xc", "xa", "xc", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}\n}", "public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\n\t\tint xa = Math.min(a,k);\n\t\tk -= xa;\n\t\tint xb = Math.min(b, k);\n\t\tk -= xb;\n\t\tint xc = k;\n\t\tsum = xa - xc;\n\t\tSystem.out.println(sum);\n\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = Integer.parseInt(sc.next()); int k = Integer.parseInt(sc.next()); int sum = 0; int xa = Math.min(a,k); k -= xa; int xb = Math.min(b, k); k -= xb; int xc = k; sum = xa - xc; System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 37, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 51, 55 ], [ 8, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 58, 62 ], [ 8, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 65, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a = sc.nextLong();", "a", "sc.nextLong()", "sc.nextLong", "sc", "long b = sc.nextLong();", "b", "sc.nextLong()", "sc.nextLong", "sc", "long c = sc.nextLong();", "c", "sc.nextLong()", "sc.nextLong", "sc", "long k = sc.nextLong();", "k", "sc.nextLong()", "sc.nextLong", "sc", "long ans = 0;", "ans", "0", "ans += Math.min(a, k)", "ans", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= Math.min(a, k)", "k", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= Math.min(b, k)", "k", "Math.min(b, k)", "Math.min", "Math", "b", "k", "ans -= Math.min(c, k)", "ans", "Math.min(c, k)", "Math.min", "Math", "c", "k", "k -= Math.min(c, k)", "k", "Math.min(c, k)", "Math.min", "Math", "c", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\n\t\tlong ans = 0;\n\t\tans += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tk -= Math.min(b, k);\n\t\tans -= Math.min(c, k);\n\t\tk -= Math.min(c, k);\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); long k = sc.nextLong(); long ans = 0; ans += Math.min(a, k); k -= Math.min(a, k); k -= Math.min(b, k); ans -= Math.min(c, k); k -= Math.min(c, k); System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 2, 13, 2, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 88, 5 ], [ 88, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 36, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 48, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 56, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 62, 69 ], [ 8, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 6, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }\n}", "Main", "public static void main(String[] args) {\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }", "main", "{\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int A = scanner.nextInt();", "A", "scanner.nextInt()", "scanner.nextInt", "scanner", "int B = scanner.nextInt();", "B", "scanner.nextInt()", "scanner.nextInt", "scanner", "int C = scanner.nextInt();", "C", "scanner.nextInt()", "scanner.nextInt", "scanner", "int K = scanner.nextInt();", "K", "scanner.nextInt()", "scanner.nextInt", "scanner", "if(A > K) {\n System.out.println(K);\n return;\n }", "A > K", "A", "K", "{\n System.out.println(K);\n return;\n }", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "return;", "if(A == K) {\n System.out.println(A);\n return;\n }", "A == K", "A", "K", "{\n System.out.println(A);\n return;\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "return;", "if(A + B == K) {\n System.out.println(A);\n return;\n }", "A + B == K", "A + B", "A", "B", "K", "{\n System.out.println(A);\n return;\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "return;", "int ans = K - (A+B);", "ans", "K - (A+B)", "K", "(A+B)", "A", "B", "System.out.println( A - ans )", "System.out.println", "System.out", "System", "System.out", "A - ans", "A", "ans", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n\t// write your code here\n Scanner scanner = new Scanner(System.in);\n\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A > K) {\n System.out.println(K);\n return;\n }\n\n\n if(A == K) {\n System.out.println(A);\n return;\n }\n\n if(A + B == K) {\n System.out.println(A);\n return;\n }\n int ans = K - (A+B);\n System.out.println( A - ans );\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner scanner = new Scanner(System.in); int A = scanner.nextInt(); int B = scanner.nextInt(); int C = scanner.nextInt(); int K = scanner.nextInt(); if(A > K) { System.out.println(K); return; } if(A == K) { System.out.println(A); return; } if(A + B == K) { System.out.println(A); return; } int ans = K - (A+B); System.out.println( A - ans ); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 14, 2, 17, 13, 30, 40, 13, 40, 13, 40, 13, 9, 14, 2, 17, 13, 30, 40, 13, 40, 13, 9, 14, 2, 17, 13, 30, 40, 13, 40, 13, 9, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 87, 5 ], [ 87, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 47, 52 ], [ 52, 53 ], [ 47, 54 ], [ 42, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 59, 64 ], [ 42, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 69, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 8, 81 ], [ 81, 82 ], [ 82, 83 ], [ 6, 84 ], [ 84, 85 ], [ 0, 86 ], [ 86, 87 ], [ 86, 88 ] ]
[ "// 提出時に消す\n\n\nimport java.util.Scanner;\n\n// 提出時にMainに変更する\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "int cnt = 0;", "cnt", "0", "while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }", "cnt < k", "cnt", "k", "{\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }", "if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }", "0 < a", "0", "a", "{\n ans++;\n cnt++;\n a--;\n continue;\n }", "ans++", "ans", "cnt++", "cnt", "a--", "a", "continue;", "if (0 < b) {\n cnt++;\n b--;\n continue;\n }", "0 < b", "0", "b", "{\n cnt++;\n b--;\n continue;\n }", "cnt++", "cnt", "b--", "b", "continue;", "if (0 < c) {\n cnt++;\n ans--;\n continue;\n }", "0 < c", "0", "c", "{\n cnt++;\n ans--;\n continue;\n }", "cnt++", "cnt", "ans--", "ans", "continue;", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int cnt = 0;\n while (cnt < k) {\n if (0 < a) {\n ans++;\n cnt++;\n a--;\n continue;\n }\n if (0 < b) {\n cnt++;\n b--;\n continue;\n }\n if (0 < c) {\n cnt++;\n ans--;\n continue;\n }\n }\n\n System.out.println(ans);\n sc.close();\n }\n}", "Main" ]
// 提出時に消す import java.util.Scanner; // 提出時にMainに変更する public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int ans = 0; int cnt = 0; while (cnt < k) { if (0 < a) { ans++; cnt++; a--; continue; } if (0 < b) { cnt++; b--; continue; } if (0 < c) { cnt++; ans--; continue; } } System.out.println(ans); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 2, 17, 13, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 2, 17, 13, 14, 2, 13, 13, 30, 0, 13, 2, 13, 2, 13, 17, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 2, 17, 13, 14, 2, 13, 13, 30, 0, 13, 2, 13, 2, 13, 40, 17, 30, 0, 13, 2, 13, 2, 13, 40, 17, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 125, 5 ], [ 125, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 8, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 41, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 66, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 8, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 91, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 8, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 8, 119 ], [ 119, 120 ], [ 120, 121 ], [ 6, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ] ]
[ "\n\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A=sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B=sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C=sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K=sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int ans=0;", "ans", "0", "int K1=0;", "K1", "0", "int K2=0;", "K2", "0", "if(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}", "K>A", "K", "A", "{\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}", "ans=ans+1*A", "ans", "ans+1*A", "ans", "1*A", "1", "A", "K1=K-A", "K1", "K-A", "K", "A", "{\n\t\t\tans=ans + 1*K;\n\t\t}", "ans=ans + 1*K", "ans", "ans + 1*K", "ans", "1*K", "1", "K", "if(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}", "K1>B", "K1", "B", "{\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}", "ans=ans+B*0", "ans", "ans+B*0", "ans", "B*0", "B", "0", "K2=K1-B", "K2", "K1-B", "K1", "B", "{\n\t\t\tans=ans + 0*K1;\n\t\t}", "ans=ans + 0*K1", "ans", "ans + 0*K1", "ans", "0*K1", "0", "K1", "if(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}", "K2>C", "K2", "C", "{\n\t\t\tans=ans+C*(-1);\n\t\t}", "ans=ans+C*(-1)", "ans", "ans+C*(-1)", "ans", "C*(-1)", "C", "(-1)", "1", "{\n\t\t\tans=ans+K2*(-1);\n\t\t}", "ans=ans+K2*(-1)", "ans", "ans+K2*(-1)", "ans", "K2*(-1)", "K2", "(-1)", "1", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint A=sc.nextInt();\n\t\tint B=sc.nextInt();\n\t\tint C=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint ans=0;\n\t\tint K1=0;\n\t\tint K2=0;\n\n\n\n\t\tif(K>A) {\n\t\t\tans=ans+1*A;\n\t\t\tK1=K-A;\n\t\t}else {\n\t\t\tans=ans + 1*K;\n\t\t}\n\t\tif(K1>B) {\n\t\t\tans=ans+B*0;\n\t\t\tK2=K1-B;\n\t\t}else {\n\t\t\tans=ans + 0*K1;\n\t\t}\n\t\tif(K2>C) {\n\t\t\tans=ans+C*(-1);\n\t\t}else {\n\t\t\tans=ans+K2*(-1);\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t\tsc.close();\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int A=sc.nextInt(); int B=sc.nextInt(); int C=sc.nextInt(); int K=sc.nextInt(); int ans=0; int K1=0; int K2=0; if(K>A) { ans=ans+1*A; K1=K-A; }else { ans=ans + 1*K; } if(K1>B) { ans=ans+B*0; K2=K1-B; }else { ans=ans + 0*K1; } if(K2>C) { ans=ans+C*(-1); }else { ans=ans+K2*(-1); } System.out.println(ans); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 2, 2, 13, 17, 2, 2, 2, 13, 13, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 97, 11 ], [ 97, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 14, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 14, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 55, 57 ], [ 14, 58 ], [ 58, 59 ], [ 58, 60 ], [ 14, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 69, 73 ], [ 61, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 86, 87 ], [ 14, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 12, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }", "main", "{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = in.readLine().split(\" \");", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "int a = Integer.parseInt(str[0]);", "a", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int b = Integer.parseInt(str[1]);", "b", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "int c = Integer.parseInt(str[2]);", "c", "Integer.parseInt(str[2])", "Integer.parseInt", "Integer", "str[2]", "str", "2", "int k = Integer.parseInt(str[3]);", "k", "Integer.parseInt(str[3])", "Integer.parseInt", "Integer", "str[3]", "str", "3", "int max = 0;", "max", "0", "if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;", "b>=k-a", "b", "k-a", "k", "a", "max = Math.min(k,a)", "max", "Math.min(k,a)", "Math.min", "Math", "k", "a", "max = a*1 + (k-a-b)*-1", "max", "a*1 + (k-a-b)*-1", "a*1", "a", "1", "(k-a-b)*-1", "(k-a-b)", "k-a-b", "k", "a", "b", "-1", "1", "System.out.println(max)", "System.out.println", "System.out", "System", "System.out", "max", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int c = Integer.parseInt(str[2]);\n int k = Integer.parseInt(str[3]);\n int max = 0;\n \n if(b>=k-a)\n max = Math.min(k,a);\n else\n max = a*1 + (k-a-b)*-1;\n System.out.println(max);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] str = in.readLine().split(" "); int a = Integer.parseInt(str[0]); int b = Integer.parseInt(str[1]); int c = Integer.parseInt(str[2]); int k = Integer.parseInt(str[3]); int max = 0; if(b>=k-a) max = Math.min(k,a); else max = a*1 + (k-a-b)*-1; System.out.println(max); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 2, 2, 13, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 89, 5 ], [ 89, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 35, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 35, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 49, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 48, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 64, 72 ], [ 63, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 6, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "if ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}", "(k - a) <= 0", "(k - a)", "k", "a", "0", "{\n\t\t\tSystem.out.print(k);\n\t\t}", "System.out.print(k)", "System.out.print", "System.out", "System", "System.out", "k", "if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}", "(k - (a + b)) <= 0", "(k - (a + b))", "k", "(a + b)", "a", "b", "0", "{\n\t\t\tSystem.out.print(a);\n\t\t}", "System.out.print(a)", "System.out.print", "System.out", "System", "System.out", "a", "if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}", "(k - (a + b + c)) <= 0", "(k - (a + b + c))", "k", "(a + b + c)", "a + b + c", "a", "b", "c", "0", "{\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}", "System.out.print(a - (k - a - b))", "System.out.print", "System.out", "System", "System.out", "a - (k - a - b)", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tsc.close();\n\n\t\tif ((k - a) <= 0) {\n\t\t\tSystem.out.print(k);\n\t\t} else if ((k - (a + b)) <= 0) {\n\t\t\tSystem.out.print(a);\n\t\t} else if ((k - (a + b + c)) <= 0) {\n\t\t\tSystem.out.print(a - (k - a - b));\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); sc.close(); if ((k - a) <= 0) { System.out.print(k); } else if ((k - (a + b)) <= 0) { System.out.print(a); } else if ((k - (a + b + c)) <= 0) { System.out.print(a - (k - a - b)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 17, 29, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 17, 29, 14, 2, 2, 2, 13, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 13, 17, 2, 13, 17, 29, 14, 2, 2, 2, 13, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 13, 13, 40, 17, 29, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 133, 5 ], [ 133, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 51, 60 ], [ 44, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 61, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 67, 76 ], [ 44, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 78, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 85, 98 ], [ 44, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 100, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 114, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 121, 127 ], [ 127, 128 ], [ 107, 129 ], [ 6, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A =sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B =sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C =sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K =sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=K", "i", "K", "i++", "i++", "i", "{\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }", "{\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }", "if(K-A==0){\n System.out.println(A*1);\n return;\n }", "K-A==0", "K-A", "K", "A", "0", "{\n System.out.println(A*1);\n return;\n }", "System.out.println(A*1)", "System.out.println", "System.out", "System", "System.out", "A*1", "A", "1", "return;", "if(K-A<0){\n System.out.println(K*1);\n return;\n }", "K-A<0", "K-A", "K", "A", "0", "{\n System.out.println(K*1);\n return;\n }", "System.out.println(K*1)", "System.out.println", "System.out", "System", "System.out", "K*1", "K", "1", "return;", "if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }", "(K-A)-B<=0", "(K-A)-B", "(K-A)", "K", "A", "B", "0", "{\n System.out.println(A*1+B*0);\n return;\n }", "System.out.println(A*1+B*0)", "System.out.println", "System.out", "System", "System.out", "A*1+B*0", "A*1", "A", "1", "B*0", "B", "0", "return;", "if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }", "(K-A)-B>0", "(K-A)-B", "(K-A)", "K", "A", "B", "0", "{\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }", "System.out.println(A*1+B*0+(((K-A)-B)*(-1)))", "System.out.println", "System.out", "System", "System.out", "A*1+B*0+(((K-A)-B)*(-1))", "A*1+B*0+(((K-A)-B)*(-1))", "A*1", "A", "1", "B*0", "B", "0", "(((K-A)-B)*(-1))", "((K-A)-B)", "(K-A)", "K", "A", "B", "(-1)", "1", "return;", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }\n}", "public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A =sc.nextInt();\n int B =sc.nextInt();\n int C =sc.nextInt();\n int K =sc.nextInt();\n \n for(int i=1; i<=K; i++){\n if(K-A==0){\n System.out.println(A*1);\n return;\n }\n if(K-A<0){\n System.out.println(K*1);\n return;\n }\n if((K-A)-B<=0){\n System.out.println(A*1+B*0);\n return;\n }\n if((K-A)-B>0){\n System.out.println(A*1+B*0+(((K-A)-B)*(-1)));\n return;\n }\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A =sc.nextInt(); int B =sc.nextInt(); int C =sc.nextInt(); int K =sc.nextInt(); for(int i=1; i<=K; i++){ if(K-A==0){ System.out.println(A*1); return; } if(K-A<0){ System.out.println(K*1); return; } if((K-A)-B<=0){ System.out.println(A*1+B*0); return; } if((K-A)-B>0){ System.out.println(A*1+B*0+(((K-A)-B)*(-1))); return; } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 30, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 2, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 47, 49 ], [ 44, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 44, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int a=scan.nextInt();\n int b=scan.nextInt();\n int c=scan.nextInt();\n int num=scan.nextInt();\n int ans=0;\n if(num<=a){\n ans=num;\n }else{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int a=scan.nextInt();\n int b=scan.nextInt();\n int c=scan.nextInt();\n int num=scan.nextInt();\n int ans=0;\n if(num<=a){\n ans=num;\n }else{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int a=scan.nextInt();\n int b=scan.nextInt();\n int c=scan.nextInt();\n int num=scan.nextInt();\n int ans=0;\n if(num<=a){\n ans=num;\n }else{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner scan=new Scanner(System.in);\n int a=scan.nextInt();\n int b=scan.nextInt();\n int c=scan.nextInt();\n int num=scan.nextInt();\n int ans=0;\n if(num<=a){\n ans=num;\n }else{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }\n System.out.println(ans);\n }", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a=scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b=scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c=scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int num=scan.nextInt();", "num", "scan.nextInt()", "scan.nextInt", "scan", "int ans=0;", "ans", "0", "if(num<=a){\n ans=num;\n }else{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }", "num<=a", "num", "a", "{\n ans=num;\n }", "ans=num", "ans", "num", "{\n if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }\n }", "if(num<=a+b){\n ans=num-b;\n }else{\n ans=a-(num-(a+b));\n }", "num<=a+b", "num", "a+b", "a", "b", "{\n ans=num-b;\n }", "ans=num-b", "ans", "num-b", "num", "b", "{\n ans=a-(num-(a+b));\n }", "ans=a-(num-(a+b))", "ans", "a-(num-(a+b))", "a", "(num-(a+b))", "num", "(a+b)", "a", "b", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int a=scan.nextInt(); int b=scan.nextInt(); int c=scan.nextInt(); int num=scan.nextInt(); int ans=0; if(num<=a){ ans=num; }else{ if(num<=a+b){ ans=num-b; }else{ ans=a-(num-(a+b)); } } System.out.println(ans); } }
[ 7, 6, 12, 13, 30, 29, 2, 18, 13, 13, 18, 13, 13, 23, 13, 23, 13, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 2, 17, 17, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 2, 13, 13, 2, 13, 4, 13, 2, 13, 13, 29, 17, 29, 17, 23, 13, 23, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 40, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 17, 41, 13, 4, 13, 13, 2, 13, 17, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 17, 17, 29, 13, 29, 2, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 13, 29, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 23, 13, 12, 13, 30, 42, 40, 4, 18, 13, 30, 38, 5, 13, 30, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 6, 13, 12, 13, 30, 4, 13, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 13, 2, 18, 13, 13, 17, 4, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 13, 2, 18, 13, 13, 17, 4, 13, 23, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 2, 3 ], [ 2, 4 ], [ 4, 5 ], [ 5, 6 ], [ 6, 7 ], [ 7, 8 ], [ 7, 9 ], [ 6, 10 ], [ 10, 11 ], [ 10, 12 ], [ 2, 13 ], [ 13, 14 ], [ 2, 15 ], [ 15, 16 ], [ 0, 17 ], [ 17, 18 ], [ 17, 19 ], [ 0, 20 ], [ 20, 21 ], [ 20, 22 ], [ 0, 23 ], [ 500, 24 ], [ 500, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 27, 29 ], [ 500, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 32, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 30, 45 ], [ 45, 46 ], [ 500, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 50, 64 ], [ 64, 65 ], [ 49, 66 ], [ 66, 67 ], [ 47, 68 ], [ 68, 69 ], [ 47, 70 ], [ 70, 71 ], [ 47, 72 ], [ 72, 73 ], [ 500, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 78, 83 ], [ 83, 84 ], [ 74, 85 ], [ 85, 86 ], [ 500, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 91, 96 ], [ 87, 97 ], [ 97, 98 ], [ 87, 99 ], [ 99, 100 ], [ 500, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 103, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 103, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 125, 131 ], [ 131, 132 ], [ 103, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 101, 139 ], [ 139, 140 ], [ 101, 141 ], [ 141, 142 ], [ 500, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 149, 150 ], [ 149, 151 ], [ 149, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 153, 156 ], [ 145, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 145, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 168, 170 ], [ 161, 171 ], [ 171, 172 ], [ 172, 173 ], [ 161, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 175, 179 ], [ 179, 180 ], [ 180, 181 ], [ 179, 182 ], [ 143, 183 ], [ 183, 184 ], [ 500, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 187, 191 ], [ 191, 192 ], [ 191, 193 ], [ 191, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 195, 198 ], [ 187, 199 ], [ 199, 200 ], [ 200, 201 ], [ 199, 202 ], [ 187, 203 ], [ 203, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 203, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 210, 212 ], [ 203, 213 ], [ 213, 214 ], [ 214, 215 ], [ 203, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 221, 222 ], [ 222, 223 ], [ 221, 224 ], [ 185, 225 ], [ 225, 226 ], [ 500, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 234 ], [ 234, 235 ], [ 235, 236 ], [ 236, 237 ], [ 236, 238 ], [ 234, 239 ], [ 239, 240 ], [ 239, 241 ], [ 234, 242 ], [ 242, 243 ], [ 243, 244 ], [ 234, 245 ], [ 245, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 246, 250 ], [ 229, 251 ], [ 251, 252 ], [ 227, 253 ], [ 253, 254 ], [ 227, 255 ], [ 255, 256 ], [ 500, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 257, 261 ], [ 261, 262 ], [ 257, 263 ], [ 263, 264 ], [ 263, 265 ], [ 265, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 266, 270 ], [ 265, 271 ], [ 271, 272 ], [ 272, 273 ], [ 272, 274 ], [ 271, 275 ], [ 263, 276 ], [ 276, 277 ], [ 263, 278 ], [ 278, 279 ], [ 257, 280 ], [ 280, 281 ], [ 280, 282 ], [ 282, 283 ], [ 283, 284 ], [ 283, 285 ], [ 282, 286 ], [ 286, 287 ], [ 287, 288 ], [ 286, 289 ], [ 286, 290 ], [ 282, 291 ], [ 291, 292 ], [ 292, 293 ], [ 293, 294 ], [ 293, 295 ], [ 291, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 299, 300 ], [ 291, 301 ], [ 301, 302 ], [ 302, 303 ], [ 291, 304 ], [ 305, 305 ], [ 305, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 306, 310 ], [ 310, 311 ], [ 311, 312 ], [ 310, 313 ], [ 280, 314 ], [ 314, 315 ], [ 500, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 316, 320 ], [ 320, 321 ], [ 316, 322 ], [ 322, 323 ], [ 322, 324 ], [ 324, 325 ], [ 325, 326 ], [ 325, 327 ], [ 324, 328 ], [ 328, 329 ], [ 328, 330 ], [ 322, 331 ], [ 331, 332 ], [ 316, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 339, 340 ], [ 336, 341 ], [ 341, 342 ], [ 342, 343 ], [ 343, 344 ], [ 343, 345 ], [ 342, 346 ], [ 346, 347 ], [ 347, 348 ], [ 347, 349 ], [ 335, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 316, 354 ], [ 354, 355 ], [ 354, 356 ], [ 356, 357 ], [ 357, 358 ], [ 358, 359 ], [ 359, 360 ], [ 358, 361 ], [ 361, 362 ], [ 316, 363 ], [ 363, 364 ], [ 363, 365 ], [ 365, 366 ], [ 366, 367 ], [ 367, 368 ], [ 368, 369 ], [ 367, 370 ], [ 370, 371 ], [ 316, 372 ], [ 372, 373 ], [ 372, 374 ], [ 374, 375 ], [ 375, 376 ], [ 375, 377 ], [ 374, 379 ], [ 379, 380 ], [ 380, 381 ], [ 381, 382 ], [ 381, 383 ], [ 379, 384 ], [ 384, 385 ], [ 384, 386 ], [ 379, 387 ], [ 387, 388 ], [ 388, 389 ], [ 379, 390 ], [ 390, 391 ], [ 391, 392 ], [ 392, 393 ], [ 392, 394 ], [ 391, 395 ], [ 395, 396 ], [ 374, 397 ], [ 397, 398 ], [ 372, 399 ], [ 399, 400 ], [ 316, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 404, 405 ], [ 404, 406 ], [ 403, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 410, 412 ], [ 408, 413 ], [ 413, 414 ], [ 413, 415 ], [ 408, 416 ], [ 416, 417 ], [ 417, 418 ], [ 408, 419 ], [ 419, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 420, 424 ], [ 424, 425 ], [ 403, 426 ], [ 426, 427 ], [ 401, 428 ], [ 428, 429 ], [ 500, 430 ], [ 430, 431 ], [ 430, 432 ], [ 432, 433 ], [ 432, 434 ], [ 434, 435 ], [ 435, 436 ], [ 435, 437 ], [ 432, 438 ], [ 438, 439 ], [ 430, 440 ], [ 440, 441 ], [ 440, 442 ], [ 442, 443 ], [ 443, 444 ], [ 444, 445 ], [ 445, 446 ], [ 445, 447 ], [ 443, 448 ], [ 448, 449 ], [ 448, 450 ], [ 450, 451 ], [ 450, 452 ], [ 443, 453 ], [ 453, 454 ], [ 454, 455 ], [ 443, 456 ], [ 457, 457 ], [ 457, 458 ], [ 458, 459 ], [ 458, 460 ], [ 460, 461 ], [ 461, 462 ], [ 461, 463 ], [ 460, 464 ], [ 442, 465 ], [ 465, 466 ], [ 440, 467 ], [ 467, 468 ], [ 430, 469 ], [ 469, 470 ], [ 469, 471 ], [ 471, 472 ], [ 472, 473 ], [ 473, 474 ], [ 474, 475 ], [ 474, 476 ], [ 472, 477 ], [ 477, 478 ], [ 477, 479 ], [ 479, 480 ], [ 479, 481 ], [ 472, 482 ], [ 482, 483 ], [ 483, 484 ], [ 472, 485 ], [ 486, 486 ], [ 486, 487 ], [ 487, 488 ], [ 487, 489 ], [ 489, 490 ], [ 490, 491 ], [ 490, 492 ], [ 489, 493 ], [ 471, 494 ], [ 494, 495 ], [ 469, 496 ], [ 496, 497 ], [ 430, 498 ], [ 0, 499 ], [ 499, 500 ], [ 499, 501 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}", "Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}", "public int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}", "compare", "{\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}", "return p1.u-p2.u;", "p1.u-p2.u", "p1.u", "p1", "p1.u", "p2.u", "p2", "p2.u", "Pair p1", "p1", "Pair p2", "p2", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}", "Main", "static long mod=(long)1e9+7;", "mod", "(long)1e9+7", "(long)1e9", "7", "public static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}", "main", "{\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}", "Writer out=new Writer(System.out);", "out", "new Writer(System.out)", "Reader in=new Reader(System.in);", "in", "new Reader(System.in)", "int ts=1;", "ts", "1", "out.close()", "out.close", "out", "String[] args", "args", "static boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}", "tri", "{\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}", "if(c<a+b && c>abs(a-b)) return true;", "c<a+b && c>abs(a-b)", "c<a+b", "c", "a+b", "a", "b", "c>abs(a-b)", "c", "abs(a-b)", "abs", "a-b", "a", "b", "return true;", "true", "return false;", "false", "int a", "a", "int b", "b", "int c", "c", "/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}", "abs", "{\n\t\treturn a>0 ? a : -a;\n\t}", "return a>0 ? a : -a;", "a>0 ? a : -a", "a>0", "a", "0", "a", "-a", "a", "int a", "a", "static int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}", "max", "{\n\t\treturn a>b ? a : b;\n\t}", "return a>b ? a : b;", "a>b ? a : b", "a>b", "a", "b", "a", "b", "int a", "a", "int b", "b", "static int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}", "pow", "{\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}", "if(m==0) return 1;", "m==0", "m", "0", "return 1;", "1", "int temp=pow(n,m/2);", "temp", "pow(n,m/2)", "pow", "n", "m/2", "m", "2", "long res=(((long)temp*temp)%mod);", "res", "(((long)temp*temp)%mod)", "((long)temp*temp)", "(long)temp", "temp", "mod", "if(m%2==0) return (int)res;", "m%2==0", "m%2", "m", "2", "0", "return (int)res;", "(int)res", "return (int)((res*n)%mod);", "(int)((res*n)%mod)", "(res*n)", "res", "n", "mod", "int n", "n", "int m", "m", "static void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}", "sort", "{\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}", "ArrayList<Integer> list=new ArrayList<>();", "list", "new ArrayList<>()", "for (int i:a) list.add(i);", "int i", "a", "list.add(i);", "list.add(i)", "list.add", "list", "i", "Collections.sort(list)", "Collections.sort", "Collections", "list", "for (int i=0; i<a.length; i++) a[i]=list.get(i);", "int i=0;", "int i=0;", "i", "0", "i<a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "a[i]=list.get(i);", "a[i]=list.get(i)", "a[i]", "a", "i", "list.get(i)", "list.get", "list", "i", "int[] a", "a", "static void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}", "sort", "{\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}", "ArrayList<Long> list=new ArrayList<>();", "list", "new ArrayList<>()", "for(long i: a) list.add(i);", "long i", "a", "list.add(i);", "list.add(i)", "list.add", "list", "i", "Collections.sort(list)", "Collections.sort", "Collections", "list", "for(int i=0; i<a.length; i++) a[i]=list.get(i);", "int i=0;", "int i=0;", "i", "0", "i<a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "a[i]=list.get(i);", "a[i]=list.get(i)", "a[i]", "a", "i", "list.get(i)", "list.get", "list", "i", "long a[]", "a", "static int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}", "array", "{\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}", "int a[]=new int[n];", "a", "new int[n]", "n", "for(int i=0; i<n; i++) a[i]=value;", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "a[i]=value;", "a[i]=value", "a[i]", "a", "i", "value", "return a;", "a", "int n", "n", "int value", "value", "static class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "Pair", "int u", "u", "v;", "v", "Pair(int u, int v){this.u=u; this.v=v;}", "Pair", "{this.u=u; this.v=v;}", "this.u=u", "this.u", "this", "this.u", "u", "this.v=v", "this.v", "this", "this.v", "v", "int u", "u", "int v", "v", "static void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}", "sort", "{\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}", "List<Pair> al=new ArrayList<>(Arrays.asList(coll));", "al", "new ArrayList<>(Arrays.asList(coll))", "Collections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t})", "Collections.sort", "Collections", "al", "new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}", "for(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<al.size()", "i", "al.size()", "al.size", "al", "i++", "i++", "i", "{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}", "{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}", "coll[i]=al.get(i)", "coll[i]", "coll", "i", "al.get(i)", "al.get", "al", "i", "Pair [] coll", "coll", "static class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}", "Reader", "BufferedReader br;", "br", "StringTokenizer to;", "to", "Reader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}", "Reader", "{\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}", "br=new BufferedReader(new InputStreamReader(stream))", "br", "new BufferedReader(new InputStreamReader(stream))", "to=new StringTokenizer(\"\")", "to", "new StringTokenizer(\"\")", "InputStream stream", "stream", "String next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}", "next", "{\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}", "while(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}", "!to.hasMoreTokens()", "to.hasMoreTokens()", "to.hasMoreTokens", "to", "{\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}", "try {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}", "catch(IOException e) {}", "IOException e", "{}", "{\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}", "to=new StringTokenizer(br.readLine())", "to", "new StringTokenizer(br.readLine())", "return to.nextToken();", "to.nextToken()", "to.nextToken", "to", "int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "nextInt", "{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}", "nextLong", "{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "int [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}", "readArray", "{\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}", "int a[]=new int[n];", "a", "new int[n]", "n", "for(int i=0; i<n ;i++) a[i]=nextInt();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "a[i]=nextInt();", "a[i]=nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "long [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}", "readLongArray", "{\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}", "long a[]=new long[n];", "a", "new long[n]", "n", "for(int i=0; i<n ;i++) a[i]=nextLong();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "a[i]=nextLong();", "a[i]=nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "static class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}", "Writer", "Writer(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}", "Writer", "{\n\t\t\tsuper(stream);\n\t\t}", "super(stream)", "super", "stream", "OutputStream stream", "stream", "void println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}", "println", "{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}", "for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "print(array[i]+\" \")", "print", "array[i]+\" \"", "array[i]", "array", "i", "\" \"", "println()", "println", "int [] array", "array", "void println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}", "println", "{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}", "for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}", "print(array[i]+\" \")", "print", "array[i]+\" \"", "array[i]", "array", "i", "\" \"", "println()", "println", "long [] array", "array", "PrintWriter", "public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}", "public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt();\n\t\t\tint sum=0;\n\t\t\tint temp;\n\t\t\ttemp=Math.min(a,k);\n\t\t\tsum+=temp; k-=temp;\n\t\t\ttemp=Math.min(b, k);\n\t\t\tk-=temp;\n\t\t\ttemp=Math.min(c, k);\n\t\t\tsum-=temp; k-=temp;\n\t\t\tout.println(sum);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}", "Main" ]
import java.io.*; import java.util.*; public class Main{ static long mod=(long)1e9+7; public static void main(String[] args) throws IOException { Writer out=new Writer(System.out); Reader in=new Reader(System.in); int ts=1; outer: while(ts-->0) { int a=in.nextInt(), b=in.nextInt(), c=in.nextInt(), k=in.nextInt(); int sum=0; int temp; temp=Math.min(a,k); sum+=temp; k-=temp; temp=Math.min(b, k); k-=temp; temp=Math.min(c, k); sum-=temp; k-=temp; out.println(sum); } out.close(); } static boolean tri(int a, int b, int c) { if(c<a+b && c>abs(a-b)) return true; return false; } /*********************************** UTILITY CODE BELOW **************************************/ static int abs(int a) { return a>0 ? a : -a; } static int max(int a, int b) { return a>b ? a : b; } static int pow(int n, int m) { if(m==0) return 1; int temp=pow(n,m/2); long res=(((long)temp*temp)%mod); if(m%2==0) return (int)res; return (int)((res*n)%mod); } static class Pair{ int u, v; Pair(int u, int v){this.u=u; this.v=v;} static void sort(Pair [] coll) { List<Pair> al=new ArrayList<>(Arrays.asList(coll)); Collections.sort(al,new Comparator<Pair>() { public int compare(Pair p1, Pair p2) { return p1.u-p2.u; } }); for(int i=0; i<al.size(); i++) { coll[i]=al.get(i); } } } static void sort(int[] a) { ArrayList<Integer> list=new ArrayList<>(); for (int i:a) list.add(i); Collections.sort(list); for (int i=0; i<a.length; i++) a[i]=list.get(i); } static void sort(long a[]) { ArrayList<Long> list=new ArrayList<>(); for(long i: a) list.add(i); Collections.sort(list); for(int i=0; i<a.length; i++) a[i]=list.get(i); } static int [] array(int n, int value) { int a[]=new int[n]; for(int i=0; i<n; i++) a[i]=value; return a; } static class Reader{ BufferedReader br; StringTokenizer to; Reader(InputStream stream){ br=new BufferedReader(new InputStreamReader(stream)); to=new StringTokenizer(""); } String next() { while(!to.hasMoreTokens()) { try { to=new StringTokenizer(br.readLine()); }catch(IOException e) {} } return to.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } int [] readArray(int n) { int a[]=new int[n]; for(int i=0; i<n ;i++) a[i]=nextInt(); return a; } long [] readLongArray(int n) { long a[]=new long[n]; for(int i=0; i<n ;i++) a[i]=nextLong(); return a; } } static class Writer extends PrintWriter{ Writer(OutputStream stream){ super(stream); } void println(int [] array) { for(int i=0; i<array.length; i++) { print(array[i]+" "); } println(); } void println(long [] array) { for(int i=0; i<array.length; i++) { print(array[i]+" "); } println(); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 87, 5 ], [ 87, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 34, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 58, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 8, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 6, 84 ], [ 84, 85 ], [ 0, 86 ], [ 86, 87 ], [ 86, 88 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }\n}", "Main", "public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }", "main", "{\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = Integer.parseInt(sc.next());", "a", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int b = Integer.parseInt(sc.next());", "b", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int c = Integer.parseInt(sc.next());", "c", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int k = Integer.parseInt(sc.next());", "k", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "sc.close()", "sc.close", "sc", "int result = 0;", "result", "0", "if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }", "k <= a", "k", "a", "{\n result = k;\n }", "result = k", "result", "k", "if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }", "k <= a + b", "k", "a + b", "a", "b", "{\n result = a;\n }", "result = a", "result", "a", "{\n result = a - (k - (a + b));\n }", "result = a - (k - (a + b))", "result", "a - (k - (a + b))", "a", "(k - (a + b))", "k", "(a + b)", "a", "b", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String args[]", "args", "public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }\n}", "public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n sc.close();\n\n // 主処理\n int result = 0;\n if (k <= a) {\n result = k;\n } else if (k <= a + b) {\n result = a;\n } else {\n result = a - (k - (a + b));\n }\n\n // 出力\n System.out.println(result);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]) { // 入力 Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = Integer.parseInt(sc.next()); int k = Integer.parseInt(sc.next()); sc.close(); // 主処理 int result = 0; if (k <= a) { result = k; } else if (k <= a + b) { result = a; } else { result = a - (k - (a + b)); } // 出力 System.out.println(result); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 59, 5 ], [ 59, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 34, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 44, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 6, 56 ], [ 56, 57 ], [ 0, 58 ], [ 58, 59 ], [ 58, 60 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = Integer.parseInt(sc.next());", "a", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int b = Integer.parseInt(sc.next());", "b", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int c = Integer.parseInt(sc.next());", "c", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int k = Integer.parseInt(sc.next());", "k", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int num = 0;", "num", "0", "int count = 0;", "count", "0", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 入力\n int a = Integer.parseInt(sc.next()); // +1\n int b = Integer.parseInt(sc.next()); // 0\n int c = Integer.parseInt(sc.next()); // -1\n int k = Integer.parseInt(sc.next());\n\n // 出力\n int num = 0;\n int count = 0;\n outside: {\n for (int i = 0; i < a; i++) {\n if (count == k) {\n break outside;\n }\n num++;\n count++;\n }\n for (int i = 0; i < b; i++) {\n if (count == k) {\n break outside;\n }\n count++;\n }\n for (int i = 0; i < c; i++) {\n if (count == k) {\n break outside;\n }\n num--;\n count++;\n }\n }\n System.out.println(num);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 入力 int a = Integer.parseInt(sc.next()); // +1 int b = Integer.parseInt(sc.next()); // 0 int c = Integer.parseInt(sc.next()); // -1 int k = Integer.parseInt(sc.next()); // 出力 int num = 0; int count = 0; outside: { for (int i = 0; i < a; i++) { if (count == k) { break outside; } num++; count++; } for (int i = 0; i < b; i++) { if (count == k) { break outside; } count++; } for (int i = 0; i < c; i++) { if (count == k) { break outside; } num--; count++; } } System.out.println(num); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 37, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 49, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 63, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 68, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 82, 86 ], [ 79, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 89, 93 ], [ 79, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int a = in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "int b = in.nextInt();", "b", "in.nextInt()", "in.nextInt", "in", "int c = in.nextInt();", "c", "in.nextInt()", "in.nextInt", "in", "int k = in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "int total =0;", "total", "0", "total += Math.min(a, k)", "total", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= Math.min(a, k)", "k", "Math.min(a, k)", "Math.min", "Math", "a", "k", "if (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}", "k==0", "k", "0", "{\n\t\t\tSystem.out.println(total);}", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "{\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}", "k-= Math.min(b, k)", "k", "Math.min(b, k)", "Math.min", "Math", "b", "k", "if (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}", "k==0", "k", "0", "{\n\t\t\t\tSystem.out.println(total);}", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "{\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}", "total -= Math.min(c, k)", "total", "Math.min(c, k)", "Math.min", "Math", "c", "k", "k -= Math.min(c, k)", "k", "Math.min(c, k)", "Math.min", "Math", "c", "k", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}\n\t\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint total =0;\n\t\ttotal += Math.min(a, k);\n\t\tk -= Math.min(a, k);\n\t\tif (k==0) {\n\t\t\tSystem.out.println(total);}\n\t\telse {\n\t\t\tk-= Math.min(b, k);\n\t\t\tif (k==0) {\n\t\t\t\tSystem.out.println(total);}\n\t\t\telse {\n\t\t\t\ttotal -= Math.min(c, k);\n\t\t\t\tk -= Math.min(c, k);\n\t\t\t\tSystem.out.println(total);}}\n\t}\n\t\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int k = in.nextInt(); int total =0; total += Math.min(a, k); k -= Math.min(a, k); if (k==0) { System.out.println(total);} else { k-= Math.min(b, k); if (k==0) { System.out.println(total);} else { total -= Math.min(c, k); k -= Math.min(c, k); System.out.println(total);}} } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 2, 13, 13, 1, 40, 13, 40, 13, 30, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 2, 13, 13, 1, 40, 13, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 2, 13, 13, 2, 13, 13, 1, 40, 13, 40, 13, 30, 30, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 110, 5 ], [ 110, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 38, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 38, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 8, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 69, 71 ], [ 60, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 60, 77 ], [ 78, 78 ], [ 8, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 88, 89 ], [ 88, 90 ], [ 79, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 79, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 8, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 6, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int maxIndex = scan.nextInt();", "maxIndex", "scan.nextInt()", "scan.nextInt", "scan", "int index = 0;", "index", "0", "int sum = 0;", "sum", "0", "for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < a && index < maxIndex", "i < a", "i", "a", "index < maxIndex", "index", "maxIndex", "i++,index++", "i++", "i", "index++", "index", "{\n sum += 1;\n }", "{\n sum += 1;\n }", "sum += 1", "sum", "1", "for(int j = 0;j < b && index < maxIndex;j++,index++){\n }", "int j = 0;", "int j = 0;", "j", "0", "j < b && index < maxIndex", "j < b", "j", "b", "index < maxIndex", "index", "maxIndex", "j++,index++", "j++", "j", "index++", "index", "{\n }", "{\n }", "for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }", "int k = 0;", "int k = 0;", "k", "0", "k < c && index < maxIndex", "k < c", "k", "c", "index < maxIndex", "index", "maxIndex", "k++,index++", "k++", "k", "index++", "index", "{\n sum -= 1;\n }", "{\n sum -= 1;\n }", "sum -= 1", "sum", "1", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n int c = scan.nextInt();\n int maxIndex = scan.nextInt();\n \n int index = 0;\n int sum = 0;\n for(int i = 0;i < a && index < maxIndex;i++,index++){\n sum += 1;\n }\n for(int j = 0;j < b && index < maxIndex;j++,index++){\n }\n for(int k = 0;k < c && index < maxIndex;k++,index++){\n sum -= 1;\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int maxIndex = scan.nextInt(); int index = 0; int sum = 0; for(int i = 0;i < a && index < maxIndex;i++,index++){ sum += 1; } for(int j = 0;j < b && index < maxIndex;j++,index++){ } for(int k = 0;k < c && index < maxIndex;k++,index++){ sum -= 1; } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 13, 0, 13, 4, 18, 13, 2, 13, 13, 17, 4, 18, 18, 13, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 75, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 9, 14 ], [ 14, 15 ], [ 75, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 18, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 18, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 18, 39 ], [ 39, 40 ], [ 39, 41 ], [ 18, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 18, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 51, 55 ], [ 18, 56 ], [ 56, 57 ], [ 56, 58 ], [ 18, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 18, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 0, 74 ], [ 74, 75 ], [ 74, 76 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n private static Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n\n solve();\n }\n\n private static void solve() {\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n private static Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n\n solve();\n }\n\n private static void solve() {\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }\n}", "Main", "private static Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "public static void main(String[] args) {\n\n solve();\n }", "main", "{\n\n solve();\n }", "solve()", "solve", "String[] args", "args", "private static void solve() {\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }", "solve", "{\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }", "int a = scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "int b = scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "int c = scanner.nextInt();", "c", "scanner.nextInt()", "scanner.nextInt", "scanner", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "int count = 0;", "count", "0", "int result = Math.min(a, k);", "result", "Math.min(a, k)", "Math.min", "Math", "a", "k", "count = Math.min(a, k)", "count", "Math.min(a, k)", "Math.min", "Math", "a", "k", "count += b", "count", "b", "result -= Math.max(k - count, 0)", "result", "Math.max(k - count, 0)", "Math.max", "Math", "k - count", "k", "count", "0", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "public class Main {\n\n private static Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n\n solve();\n }\n\n private static void solve() {\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }\n}", "public class Main {\n\n private static Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n\n solve();\n }\n\n private static void solve() {\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n\n int count = 0;\n int result = Math.min(a, k);\n count = Math.min(a, k);\n\n count += b;\n result -= Math.max(k - count, 0);\n\n System.out.println(result);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { private static Scanner scanner = new Scanner(System.in); public static void main(String[] args) { solve(); } private static void solve() { int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int k = scanner.nextInt(); int count = 0; int result = Math.min(a, k); count = Math.min(a, k); count += b; result -= Math.max(k - count, 0); System.out.println(result); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 37, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 49, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 8, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 70, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int res = 0;", "res", "0", "res+=Math.min(A, K)", "res", "Math.min(A, K)", "Math.min", "Math", "A", "K", "K -= res", "K", "res", "if(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}", "K==0", "K", "0", "{\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "System.exit(0)", "System.exit", "System", "0", "K-=B", "K", "B", "if(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}", "K>0", "K", "0", "{\n\t\t\tres-=Math.min(K, C);\n\t\t}", "res-=Math.min(K, C)", "res", "Math.min(K, C)", "Math.min", "Math", "K", "C", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint res = 0;\n\t\tres+=Math.min(A, K);\n\t\tK -= res;\n\t\tif(K==0) {\n\t\t\tSystem.out.println(res);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tK-=B;\n\t\tif(K>0) {\n\t\t\tres-=Math.min(K, C);\n\t\t}\n\t\tSystem.out.println(res);\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int res = 0; res+=Math.min(A, K); K -= res; if(K==0) { System.out.println(res); System.exit(0); } K-=B; if(K>0) { res-=Math.min(K, C); } System.out.println(res); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 46, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 46, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 6, 82 ], [ 82, 83 ], [ 0, 84 ], [ 84, 85 ], [ 84, 86 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long one = sc.nextLong();", "one", "sc.nextLong()", "sc.nextLong", "sc", "long zero = sc.nextLong();", "zero", "sc.nextLong()", "sc.nextLong", "sc", "long minus = sc.nextLong();", "minus", "sc.nextLong()", "sc.nextLong", "sc", "long card = sc.nextLong();", "card", "sc.nextLong()", "sc.nextLong", "sc", "long sum = 0;", "sum", "0", "if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }", "card <= one", "card", "one", "{\n System.out.println(card);\n }", "System.out.println(card)", "System.out.println", "System.out", "System", "System.out", "card", "{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }", "sum += one", "sum", "one", "card -= one", "card", "one", "if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }", "card > zero", "card", "zero", "{\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }", "card -= zero", "card", "zero", "for(int i = 0;i < card;i++){\n sum--;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < card", "i", "card", "i++", "i++", "i", "{\n sum--;\n }", "{\n sum--;\n }", "sum--", "sum", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long one = sc.nextLong();\n long zero = sc.nextLong();\n long minus = sc.nextLong();\n long card = sc.nextLong();\n long sum = 0;\n if(card <= one){\n System.out.println(card);\n }\n else{\n sum += one;\n card -= one;\n if(card > zero){\n card -= zero;\n for(int i = 0;i < card;i++){\n sum--;\n }\n }\n System.out.println(sum);\n }\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long one = sc.nextLong(); long zero = sc.nextLong(); long minus = sc.nextLong(); long card = sc.nextLong(); long sum = 0; if(card <= one){ System.out.println(card); } else{ sum += one; card -= one; if(card > zero){ card -= zero; for(int i = 0;i < card;i++){ sum--; } } System.out.println(sum); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 0, 18, 13, 17, 4, 18, 13, 0, 18, 13, 17, 4, 18, 13, 0, 18, 13, 17, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 18, 13, 17, 13, 30, 0, 13, 13, 14, 2, 2, 18, 13, 17, 18, 13, 17, 13, 30, 0, 13, 18, 13, 17, 30, 0, 13, 2, 18, 13, 17, 2, 13, 2, 18, 13, 17, 18, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 96, 5 ], [ 96, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 28, 29 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 8, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 45, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 55, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 8, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 6, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int[] count = new int[3];", "count", "new int[3]", "3", "count[0] = sc.nextInt()", "count[0]", "count", "0", "sc.nextInt()", "sc.nextInt", "sc", "count[1] = sc.nextInt()", "count[1]", "count", "1", "sc.nextInt()", "sc.nextInt", "sc", "count[2] = sc.nextInt()", "count[2]", "count", "2", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }", "count[0] >= k", "count[0]", "count", "0", "k", "{\n sum = k;\n }", "sum = k", "sum", "k", "if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }", "count[0] + count[1] >= k", "count[0] + count[1]", "count[0]", "count", "0", "count[1]", "count", "1", "k", "{\n sum = count[0];\n }", "sum = count[0]", "sum", "count[0]", "count", "0", "{\n sum = count[0] - (k - (count[0] + count[1]));\n }", "sum = count[0] - (k - (count[0] + count[1]))", "sum", "count[0] - (k - (count[0] + count[1]))", "count[0]", "count", "0", "(k - (count[0] + count[1]))", "k", "(count[0] + count[1])", "count[0]", "count", "0", "count[1]", "count", "1", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int[] count = new int[3];\n\n count[0] = sc.nextInt();\n count[1] = sc.nextInt();\n count[2] = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n \n if (count[0] >= k) {\n sum = k;\n } else if (count[0] + count[1] >= k) {\n sum = count[0];\n } else {\n sum = count[0] - (k - (count[0] + count[1]));\n }\n \n System.out.println(sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] count = new int[3]; count[0] = sc.nextInt(); count[1] = sc.nextInt(); count[2] = sc.nextInt(); int k = sc.nextInt(); int sum = 0; if (count[0] >= k) { sum = k; } else if (count[0] + count[1] >= k) { sum = count[0]; } else { sum = count[0] - (k - (count[0] + count[1])); } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) { \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) { \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }\n}", "Main", "public static void main(String[] args) { \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }", "main", "{ \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int score = 0;", "score", "0", "if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }", "K < A", "K", "A", "{\n score = K;\n }", "score = K", "score", "K", "if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }", "K <= A + B", "K", "A + B", "A", "B", "{\n score = A;\n }", "score = A", "score", "A", "{\n score = A - (K - A - B); \n }", "score = A - (K - A - B)", "score", "A - (K - A - B)", "A", "(K - A - B)", "K - A - B", "K", "A", "B", "System.out.println(score)", "System.out.println", "System.out", "System", "System.out", "score", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) { \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }\n}", "public class Main {\n\tpublic static void main(String[] args) { \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int score = 0;\n if (K < A) {\n score = K;\n } else if(K <= A + B) {\n score = A;\n } else {\n score = A - (K - A - B); \n }\n System.out.println(score);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int score = 0; if (K < A) { score = K; } else if(K <= A + B) { score = A; } else { score = A - (K - A - B); } System.out.println(score); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 13, 13, 29, 0, 13, 2, 13, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 13, 13, 29, 0, 13, 2, 13, 13, 4, 18, 13, 2, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 192, 29 ], [ 192, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 32, 43 ], [ 43, 44 ], [ 43, 45 ], [ 32, 46 ], [ 46, 47 ], [ 46, 48 ], [ 32, 49 ], [ 49, 50 ], [ 49, 51 ], [ 32, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 52, 56 ], [ 52, 57 ], [ 32, 58 ], [ 58, 59 ], [ 59, 60 ], [ 30, 61 ], [ 61, 62 ], [ 192, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 67, 72 ], [ 72, 73 ], [ 67, 74 ], [ 74, 75 ], [ 67, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 67, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 67, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 67, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 67, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 100, 105 ], [ 67, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 67, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 111, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 117, 122 ], [ 67, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 67, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 131, 133 ], [ 65, 134 ], [ 134, 135 ], [ 65, 136 ], [ 136, 137 ], [ 65, 138 ], [ 138, 139 ], [ 192, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 140, 144 ], [ 144, 145 ], [ 140, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 146, 152 ], [ 152, 153 ], [ 140, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 158, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 157, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 167, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 156, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 140, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 186, 189 ], [ 189, 190 ], [ 0, 191 ], [ 191, 192 ], [ 191, 193 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author EDGE\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "FastReader in = new FastReader(inputStream);", "in", "new FastReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "BEasyLinearProgramming solver = new BEasyLinearProgramming();", "solver", "new BEasyLinearProgramming()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BEasyLinearProgramming {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }\n\n }", "BEasyLinearProgramming", "public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }", "solve", "{\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }", "int a", "a", "b", "b", "c", "c", "d;", "d", "a = in.nextInt()", "a", "in.nextInt()", "in.nextInt", "in", "b = in.nextInt()", "b", "in.nextInt()", "in.nextInt", "in", "c = in.nextInt()", "c", "in.nextInt()", "in.nextInt", "in", "d = in.nextInt()", "d", "in.nextInt()", "in.nextInt", "in", "if (d <= a) {\n out.println(d);\n return;\n }", "d <= a", "d", "a", "{\n out.println(d);\n return;\n }", "out.println(d)", "out.println", "out", "d", "return;", "d = d - a", "d", "d - a", "d", "a", "if (d - b <= 0) {\n out.println(a);\n return;\n }", "d - b <= 0", "d - b", "d", "b", "0", "{\n out.println(a);\n return;\n }", "out.println(a)", "out.println", "out", "a", "return;", "d = d - b", "d", "d - b", "d", "b", "out.println(a - d)", "out.println", "out", "a - d", "a", "d", "int testNumber", "testNumber", "FastReader in", "in", "PrintWriter out", "out", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }", "FastReader", "{\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }", "br = new BufferedReader(new\n InputStreamReader(inputStream))", "br", "new BufferedReader(new\n InputStreamReader(inputStream))", "InputStream inputStream", "inputStream", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int a, b, c, d;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n if (d <= a) {\n out.println(d);\n return;\n }\n\n d = d - a;\n if (d - b <= 0) {\n out.println(a);\n return;\n }\n d = d - b;\n out.println(a - d);\n\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author EDGE */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastReader in = new FastReader(inputStream); PrintWriter out = new PrintWriter(outputStream); BEasyLinearProgramming solver = new BEasyLinearProgramming(); solver.solve(1, in, out); out.close(); } static class BEasyLinearProgramming { public void solve(int testNumber, FastReader in, PrintWriter out) { int a, b, c, d; a = in.nextInt(); b = in.nextInt(); c = in.nextInt(); d = in.nextInt(); if (d <= a) { out.println(d); return; } d = d - a; if (d - b <= 0) { out.println(a); return; } d = d - b; out.println(a - d); } } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader(InputStream inputStream) { br = new BufferedReader(new InputStreamReader(inputStream)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 13, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 8, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 6, 89 ], [ 89, 90 ], [ 0, 91 ], [ 91, 92 ], [ 91, 93 ] ]
[ "/******************************************************************************\n\n Online Java Compiler.\n Code, Compile, Run and Debug java program online.\nWrite your code in this editor and press \"Run\" button to execute it.\n\n*******************************************************************************/\n//2 1 1 3\n\nimport java.util.*;\n\npublic class Main\n{\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main\n{\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a= sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int count =0;", "count", "0", "int res=0;", "res", "0", "if(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}", "k>0", "k", "0", "{\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}", "if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }", "a>k", "a", "k", "{\n\t res+=k;\n\t }", "res+=k", "res", "k", "{\n\t res+=a;\n\t k-=a;\n\t }", "res+=a", "res", "a", "k-=a", "k", "a", "if(k>0){\n\t k-=b;\n\t}", "k>0", "k", "0", "{\n\t k-=b;\n\t}", "k-=b", "k", "b", "if(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}", "k>0", "k", "0", "{\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}", "if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }", "c>k", "c", "k", "{\n\t res-=k;\n\t }", "res-=k", "res", "k", "{\n\t res-=c;\n\t \n\t }", "res-=c", "res", "c", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public class Main\n{\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint a= sc.nextInt();\n\tint b = sc.nextInt();\n\tint c = sc.nextInt();\n\tint k = sc.nextInt();\n\tint count =0;\n\tint res=0;\n\t\n\tif(k>0){\n\t if(a>k){\n\t res+=k;\n\t }else{\n\t res+=a;\n\t k-=a;\n\t }\n\t}\n\tif(k>0){\n\t k-=b;\n\t}\n\tif(k>0){\n\t if(c>k){\n\t res-=k;\n\t }else{\n\t res-=c;\n\t \n\t }\n\t}\n\tSystem.out.println(res);\n// \twhile(k>0){\n// \t count=a;\n// \t System.out.println(k+\"a\");\n// \t k-=count;\n// \t System.out.println(k+\"av\");\n// \t k-= b;\n// \t System.out.println(k+\"an\");\n// \t count= count -c;\n// \t System.out.println(k+\"am\");\n// \t k-= c;\n// \t System.out.println(k+\"ao\");\n// \t}\n// \t System.out.println(count);\n\n\t}\n}", "Main" ]
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ //2 1 1 3 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a= sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int count =0; int res=0; if(k>0){ if(a>k){ res+=k; }else{ res+=a; k-=a; } } if(k>0){ k-=b; } if(k>0){ if(c>k){ res-=k; }else{ res-=c; } } System.out.println(res); // while(k>0){ // count=a; // System.out.println(k+"a"); // k-=count; // System.out.println(k+"av"); // k-= b; // System.out.println(k+"an"); // count= count -c; // System.out.println(k+"am"); // k-= c; // System.out.println(k+"ao"); // } // System.out.println(count); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 2, 13, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 57, 57 ], [ 57, 58 ], [ 57, 59 ], [ 57, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 53, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 6, 83 ], [ 83, 84 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int inputa = sc.nextInt();", "inputa", "sc.nextInt()", "sc.nextInt", "sc", "int inputb = sc.nextInt();", "inputb", "sc.nextInt()", "sc.nextInt", "sc", "int inputc = sc.nextInt();", "inputc", "sc.nextInt()", "sc.nextInt", "sc", "int inputk = sc.nextInt();", "inputk", "sc.nextInt()", "sc.nextInt", "sc", "int result = 0;", "result", "0", "if(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}", "inputk <= inputa", "inputk", "inputa", "{\n\t\t\tresult = inputk;\n\t\t}", "result = inputk", "result", "inputk", "if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}", "inputk <= inputa + inputb", "inputk", "inputa + inputb", "inputa", "inputb", "{\n\t\t\tresult = inputa;\n\t\t}", "result = inputa", "result", "inputa", "if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}", "inputk < inputa + inputb + inputc", "inputk", "inputa + inputb + inputc", "inputa + inputb + inputc", "inputa", "inputb", "inputc", "{\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}", "result = inputa - (inputk - inputa - inputb)", "result", "inputa - (inputk - inputa - inputb)", "inputa", "(inputk - inputa - inputb)", "inputk - inputa - inputb", "inputk", "inputa", "inputb", "{\n\t\t\tresult = inputa - inputc;\n\t\t}", "result = inputa - inputc", "result", "inputa - inputc", "inputa", "inputc", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint inputa = sc.nextInt();\n\t\tint inputb = sc.nextInt();\n\t\tint inputc = sc.nextInt();\n\t\tint inputk = sc.nextInt();\n\n\t\tint result = 0;\n\t\tif(inputk <= inputa) {\n\t\t\tresult = inputk;\n\t\t}\n\t\telse if(inputk <= inputa + inputb) {\n\t\t\tresult = inputa;\n\t\t}\n\t\telse if(inputk < inputa + inputb + inputc) {\n\t\t\tresult = inputa - (inputk - inputa - inputb);\n\t\t}else {\n\t\t\tresult = inputa - inputc;\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int inputa = sc.nextInt(); int inputb = sc.nextInt(); int inputc = sc.nextInt(); int inputk = sc.nextInt(); int result = 0; if(inputk <= inputa) { result = inputk; } else if(inputk <= inputa + inputb) { result = inputa; } else if(inputk < inputa + inputb + inputc) { result = inputa - (inputk - inputa - inputb); }else { result = inputa - inputc; } System.out.println(result); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 39, 17, 17, 17, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 14, 16 ], [ 14, 17 ], [ 14, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 8, 39 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 62, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 72, 72 ], [ 72, 73 ], [ 72, 74 ], [ 72, 75 ], [ 8, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 6, 82 ], [ 82, 83 ], [ 0, 84 ], [ 84, 85 ], [ 84, 86 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int[] s = {0,0,0,0};", "s", "{0,0,0,0}", "0", "0", "0", "0", "int a = in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "int b = in.nextInt();", "b", "in.nextInt()", "in.nextInt", "in", "int c = in.nextInt();", "c", "in.nextInt()", "in.nextInt", "in", "int k = in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "int full = 0;", "full", "0", "if(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}", "a == k", "a", "k", "{\n\t\t\tfull = a;\n\t\t}", "full = a", "full", "a", "if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}", "a > k", "a", "k", "{\n\t\t\tfull = k;\n\t\t}", "full = k", "full", "k", "{\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}", "full = a", "full", "a", "if(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}", "b <= k-a", "b", "k-a", "k", "a", "{\n\t\t\t\tfull -= k-a-b;\n\t\t\t}", "full -= k-a-b", "full", "k-a-b", "k-a-b", "k", "a", "b", "System.out.println(full)", "System.out.println", "System.out", "System", "System.out", "full", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tint[] s = {0,0,0,0};\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint c = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tint full = 0;\n\n\t\tif(a == k) {\n\t\t\tfull = a;\n\t\t}else if(a > k) {\n\t\t\tfull = k;\n\t\t}else {\n\t\t\tfull = a;\n\t\t\tif(b <= k-a) {\n\t\t\t\tfull -= k-a-b;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(full);\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner in = new Scanner(System.in); int[] s = {0,0,0,0}; int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int k = in.nextInt(); int full = 0; if(a == k) { full = a; }else if(a > k) { full = k; }else { full = a; if(b <= k-a) { full -= k-a-b; } } System.out.println(full); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 17, 11, 1, 41, 13, 2, 2, 13, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 40, 17, 30, 0, 13, 2, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 33, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 41, 43 ], [ 8, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 59, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 81, 81 ], [ 81, 82 ], [ 81, 83 ], [ 81, 84 ], [ 76, 85 ], [ 85, 86 ], [ 85, 87 ], [ 76, 88 ], [ 88, 89 ], [ 89, 90 ], [ 76, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 55, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 8, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 6, 109 ], [ 109, 110 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args){ \n Scanner scan = new Scanner(System.in);\n String[] input = scan.nextLine().split(\" \");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]);\n int c = Integer.parseInt(input[2]);\n int k = Integer.parseInt(input[3]);\n int out = 0;\n if((k>=a)){\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n } else {\n out = 1*k;\n }\n System.out.println(out);\n }\n\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args){ \n Scanner scan = new Scanner(System.in);\n String[] input = scan.nextLine().split(\" \");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]);\n int c = Integer.parseInt(input[2]);\n int k = Integer.parseInt(input[3]);\n int out = 0;\n if((k>=a)){\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n } else {\n out = 1*k;\n }\n System.out.println(out);\n }\n\n\n}", "Main", "public static void main(String[] args){ \n Scanner scan = new Scanner(System.in);\n String[] input = scan.nextLine().split(\" \");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]);\n int c = Integer.parseInt(input[2]);\n int k = Integer.parseInt(input[3]);\n int out = 0;\n if((k>=a)){\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n } else {\n out = 1*k;\n }\n System.out.println(out);\n }", "main", "{ \n Scanner scan = new Scanner(System.in);\n String[] input = scan.nextLine().split(\" \");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]);\n int c = Integer.parseInt(input[2]);\n int k = Integer.parseInt(input[3]);\n int out = 0;\n if((k>=a)){\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n } else {\n out = 1*k;\n }\n System.out.println(out);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "String[] input = scan.nextLine().split(\" \");", "input", "scan.nextLine().split(\" \")", "scan.nextLine().split", "scan.nextLine()", "scan.nextLine", "scan", "\" \"", "int a = Integer.parseInt(input[0]);", "a", "Integer.parseInt(input[0])", "Integer.parseInt", "Integer", "input[0]", "input", "0", "int b = Integer.parseInt(input[1]);", "b", "Integer.parseInt(input[1])", "Integer.parseInt", "Integer", "input[1]", "input", "1", "int c = Integer.parseInt(input[2]);", "c", "Integer.parseInt(input[2])", "Integer.parseInt", "Integer", "input[2]", "input", "2", "int k = Integer.parseInt(input[3]);", "k", "Integer.parseInt(input[3])", "Integer.parseInt", "Integer", "input[3]", "input", "3", "int out = 0;", "out", "0", "if((k>=a)){\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n } else {\n out = 1*k;\n }", "(k>=a)", "k", "a", "{\n for(int i = a; i > 0; i--){\n out+=1;\n \n }\n \n for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }\n }", "for(int i = a; i > 0; i--){\n out+=1;\n \n }", "int i = a;", "int i = a;", "i", "a", "i > 0", "i", "0", "i--", "i--", "i", "{\n out+=1;\n \n }", "{\n out+=1;\n \n }", "out+=1", "out", "1", "for(int i = k-a-b; i > 0; i--){\n out+=-1;\n \n }", "int i = k-a-b;", "int i = k-a-b;", "i", "k-a-b", "k-a-b", "k", "a", "b", "i > 0", "i", "0", "i--", "i--", "i", "{\n out+=-1;\n \n }", "{\n out+=-1;\n \n }", "out+=-1", "out", "-1", "1", "{\n out = 1*k;\n }", "out = 1*k", "out", "1*k", "1", "k", "System.out.println(out)", "System.out.println", "System.out", "System", "System.out", "out", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String[] input = scan.nextLine().split(" "); int a = Integer.parseInt(input[0]); int b = Integer.parseInt(input[1]); int c = Integer.parseInt(input[2]); int k = Integer.parseInt(input[3]); int out = 0; if((k>=a)){ for(int i = a; i > 0; i--){ out+=1; } for(int i = k-a-b; i > 0; i--){ out+=-1; } } else { out = 1*k; } System.out.println(out); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 13, 0, 13, 2, 2, 13, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 46, 62 ], [ 62, 63 ], [ 62, 64 ], [ 65, 65 ], [ 65, 66 ], [ 65, 67 ], [ 65, 68 ], [ 46, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 69, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 6, 89 ], [ 89, 90 ], [ 0, 91 ], [ 91, 92 ], [ 91, 93 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "if(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}", "k <= a", "k", "a", "{\n\t\t\tSystem.out.println(k);\n\t\t}", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "{\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}", "for(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < a", "i", "a", "i++", "i++", "i", "{\n\t\t\t\tsum++;\n\t\t\t}", "{\n\t\t\t\tsum++;\n\t\t\t}", "sum++", "sum", "k = k - a - b", "k", "k - a - b", "k - a - b", "k", "a", "b", "if(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}", "k <= 0", "k", "0", "{\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "{\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}", "System.out.println(sum - k)", "System.out.println", "System.out", "System", "System.out", "sum - k", "sum", "k", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint sum = 0;\n\t\tif(k <= a) {\n\t\t\tSystem.out.println(k);\n\t\t}else {\n\t\t\tfor(int i = 0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\tk = k - a - b;\n\t\t\tif(k <= 0) {\n\t\t\t\tSystem.out.println(sum);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(sum - k);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int sum = 0; if(k <= a) { System.out.println(k); }else { for(int i = 0; i < a; i++) { sum++; } k = k - a - b; if(k <= 0) { System.out.println(sum); }else { System.out.println(sum - k); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 2, 13, 13, 0, 13, 4, 18, 13, 17, 13, 4, 18, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 2, 17, 17, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 20, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 23, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 18, 36, 13, 20, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 30, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 30, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 30, 29, 40, 13, 29, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 0, 13, 17, 13, 14, 2, 13, 40, 17, 30, 0, 18, 13, 17, 40, 17, 12, 13, 30, 14, 2, 13, 13, 30, 4, 13, 29, 18, 13, 40, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 312, 29 ], [ 312, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 32, 43 ], [ 43, 44 ], [ 43, 45 ], [ 32, 46 ], [ 46, 47 ], [ 46, 48 ], [ 32, 49 ], [ 49, 50 ], [ 49, 51 ], [ 32, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 52, 56 ], [ 52, 57 ], [ 32, 58 ], [ 58, 59 ], [ 59, 60 ], [ 30, 61 ], [ 61, 62 ], [ 312, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 79, 80 ], [ 67, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 67, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 88, 92 ], [ 67, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 67, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 100, 104 ], [ 67, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 65, 109 ], [ 109, 110 ], [ 65, 111 ], [ 111, 112 ], [ 65, 113 ], [ 113, 114 ], [ 312, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 115, 122 ], [ 122, 123 ], [ 115, 124 ], [ 124, 125 ], [ 115, 126 ], [ 126, 127 ], [ 115, 128 ], [ 128, 129 ], [ 115, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 132, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 132, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 148, 149 ], [ 148, 150 ], [ 115, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 153, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 153, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 169, 171 ], [ 151, 172 ], [ 172, 173 ], [ 115, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 181, 182 ], [ 177, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 184, 188 ], [ 183, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 183, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 199, 200 ], [ 199, 201 ], [ 174, 202 ], [ 202, 203 ], [ 115, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 207, 208 ], [ 207, 209 ], [ 206, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 206, 214 ], [ 214, 215 ], [ 215, 216 ], [ 215, 217 ], [ 214, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 206, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 225, 227 ], [ 206, 228 ], [ 228, 229 ], [ 228, 230 ], [ 230, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 206, 235 ], [ 235, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 238, 240 ], [ 240, 241 ], [ 237, 242 ], [ 236, 243 ], [ 243, 244 ], [ 243, 245 ], [ 235, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 250, 254 ], [ 249, 255 ], [ 206, 256 ], [ 256, 257 ], [ 256, 258 ], [ 258, 259 ], [ 259, 260 ], [ 260, 261 ], [ 206, 262 ], [ 262, 263 ], [ 115, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 268, 270 ], [ 270, 271 ], [ 271, 272 ], [ 267, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 277, 278 ], [ 276, 279 ], [ 276, 280 ], [ 280, 281 ], [ 280, 282 ], [ 276, 283 ], [ 273, 284 ], [ 284, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 284, 289 ], [ 289, 290 ], [ 290, 291 ], [ 291, 292 ], [ 291, 293 ], [ 290, 294 ], [ 294, 295 ], [ 115, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 299, 303 ], [ 303, 304 ], [ 304, 305 ], [ 298, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 309, 310 ], [ 0, 311 ], [ 311, 312 ], [ 311, 313 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.DataInputStream;\nimport java.io.IOException;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author iavanish\n */\npublic class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }\n\n public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.DataInputStream;", "DataInputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }\n\n public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "FastReader in = new FastReader(inputStream);", "in", "new FastReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "BEasyLinearProgramming solver = new BEasyLinearProgramming();", "solver", "new BEasyLinearProgramming()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BEasyLinearProgramming {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }\n\n }", "BEasyLinearProgramming", "public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }", "solve", "{\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }", "long a = in.nextLong();", "a", "in.nextLong()", "in.nextLong", "in", "long b = in.nextLong();", "b", "in.nextLong()", "in.nextLong", "in", "in.nextLong()", "in.nextLong", "in", "long k = in.nextLong();", "k", "in.nextLong()", "in.nextLong", "in", "long sum = Math.min(a, k);", "sum", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= (a + b)", "k", "(a + b)", "a", "b", "sum -= Math.max(0, k)", "sum", "Math.max(0, k)", "Math.max", "Math", "0", "k", "out.println(sum)", "out.println", "out", "sum", "int testNumber", "testNumber", "FastReader in", "in", "PrintWriter out", "out", "static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }\n\n public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }", "FastReader", "private final int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private final InputStream inputStream;", "inputStream", "private final byte[] buffer;", "buffer", "private int bufferPointer;", "bufferPointer", "private int bytesRead;", "bytesRead", "public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "FastReader", "{\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = new DataInputStream(System.in)", "this.inputStream", "this", "this.inputStream", "new DataInputStream(System.in)", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "FastReader", "{\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = inputStream", "this.inputStream", "this", "this.inputStream", "inputStream", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "InputStream inputStream", "inputStream", "public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "FastReader", "{\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }", "catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }", "FileNotFoundException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = new DataInputStream(new FileInputStream(fileName))", "this.inputStream", "this", "this.inputStream", "new DataInputStream(new FileInputStream(fileName))", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "String fileName", "fileName", "public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }", "nextLong", "{\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }", "long nextLong = 0;", "nextLong", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ') {\n c = read();\n }", "c <= ' '", "c", "' '", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "boolean negative = (c == '-');", "negative", "(c == '-')", "c", "'-'", "if (negative) {\n c = read();\n }", "negative", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n nextLong = nextLong * 10 + c - '0';\n }", "nextLong = nextLong * 10 + c - '0'", "nextLong", "nextLong * 10 + c - '0'", "nextLong * 10 + c", "nextLong * 10", "nextLong", "10", "c", "'0'", "if (negative) {\n return -nextLong;\n }", "negative", "{\n return -nextLong;\n }", "return -nextLong;", "-nextLong", "nextLong", "return nextLong;", "nextLong", "public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "fillBuffer", "{\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n }", "bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "bytesRead", "inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "inputStream.read", "inputStream", "buffer", "bufferPointer = 0", "bufferPointer", "0", "BUFFER_SIZE", "if (bytesRead == -1) {\n buffer[0] = -1;\n }", "bytesRead == -1", "bytesRead", "-1", "1", "{\n buffer[0] = -1;\n }", "buffer[0] = -1", "buffer[0]", "buffer", "0", "-1", "1", "public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead) {\n fillBuffer();\n }", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "{\n fillBuffer();\n }", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }\n\n public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n long a = in.nextLong();\n long b = in.nextLong();\n in.nextLong();\n long k = in.nextLong();\n\n long sum = Math.min(a, k);\n k -= (a + b);\n sum -= Math.max(0, k);\n\n out.println(sum);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public long nextLong() {\n long nextLong = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextLong = nextLong * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextLong;\n }\n return nextLong;\n }\n\n public void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n public byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.DataInputStream; import java.io.IOException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author iavanish */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastReader in = new FastReader(inputStream); PrintWriter out = new PrintWriter(outputStream); BEasyLinearProgramming solver = new BEasyLinearProgramming(); solver.solve(1, in, out); out.close(); } static class BEasyLinearProgramming { public void solve(int testNumber, FastReader in, PrintWriter out) { long a = in.nextLong(); long b = in.nextLong(); in.nextLong(); long k = in.nextLong(); long sum = Math.min(a, k); k -= (a + b); sum -= Math.max(0, k); out.println(sum); } } static class FastReader { private final int BUFFER_SIZE = 1 << 16; private final InputStream inputStream; private final byte[] buffer; private int bufferPointer; private int bytesRead; public FastReader() { this.inputStream = new DataInputStream(System.in); this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } public FastReader(InputStream inputStream) { this.inputStream = inputStream; this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } public FastReader(String fileName) { try { this.inputStream = new DataInputStream(new FileInputStream(fileName)); this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } catch (FileNotFoundException e) { throw new RuntimeException(e); } } public long nextLong() { long nextLong = 0; byte c = read(); while (c <= ' ') { c = read(); } boolean negative = (c == '-'); if (negative) { c = read(); } do { nextLong = nextLong * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (negative) { return -nextLong; } return nextLong; } public void fillBuffer() { try { bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) { buffer[0] = -1; } } catch (IOException e) { throw new RuntimeException(e); } } public byte read() { if (bufferPointer == bytesRead) { fillBuffer(); } return buffer[bufferPointer++]; } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 38, 5, 13, 30, 0, 13, 20, 0, 13, 20, 30, 0, 13, 20, 0, 13, 20, 12, 13, 30, 41, 13, 17, 42, 2, 13, 17, 30, 4, 13, 40, 13, 4, 18, 13, 4, 18, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 2, 4, 18, 13, 13, 13, 40, 17, 4, 18, 13, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 40, 4, 18, 13, 18, 13, 13, 29, 4, 18, 13, 18, 13, 13, 29, 4, 18, 13, 18, 13, 13, 23, 13, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 6, 13, 41, 13, 2, 17, 17, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 23, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 17, 41, 13, 42, 2, 0, 13, 4, 13, 40, 17, 30, 14, 2, 13, 17, 3, 0, 18, 13, 40, 13, 13, 29, 20, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 2, 13, 17, 30, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 0, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 0, 13, 4, 18, 13, 13, 0, 13, 17, 13, 14, 2, 13, 40, 17, 0, 18, 13, 17, 40, 17, 12, 13, 30, 14, 2, 13, 13, 4, 13, 29, 18, 13, 40, 13, 12, 13, 30, 14, 2, 13, 17, 29, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 630, 11 ], [ 630, 12 ], [ 12, 13 ], [ 630, 14 ], [ 14, 15 ], [ 630, 16 ], [ 16, 17 ], [ 630, 18 ], [ 18, 19 ], [ 18, 20 ], [ 630, 21 ], [ 21, 22 ], [ 21, 23 ], [ 630, 24 ], [ 24, 25 ], [ 24, 26 ], [ 630, 27 ], [ 27, 28 ], [ 630, 29 ], [ 29, 30 ], [ 630, 31 ], [ 31, 32 ], [ 630, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 630, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 44, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 630, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 63, 76 ], [ 76, 77 ], [ 77, 78 ], [ 63, 79 ], [ 79, 80 ], [ 80, 81 ], [ 630, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 84, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 84, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 84, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 84, 105 ], [ 105, 106 ], [ 105, 107 ], [ 84, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 110, 114 ], [ 84, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 117, 121 ], [ 84, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 124, 128 ], [ 84, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 132, 136 ], [ 131, 137 ], [ 137, 138 ], [ 84, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 630, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 143, 147 ], [ 147, 148 ], [ 143, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 151, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 149, 162 ], [ 162, 163 ], [ 149, 164 ], [ 164, 165 ], [ 143, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 171, 174 ], [ 174, 175 ], [ 174, 176 ], [ 169, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 181, 182 ], [ 181, 183 ], [ 169, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 188, 189 ], [ 188, 190 ], [ 166, 191 ], [ 191, 192 ], [ 143, 193 ], [ 630, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 194, 198 ], [ 198, 199 ], [ 194, 200 ], [ 200, 201 ], [ 194, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 204, 210 ], [ 210, 211 ], [ 211, 212 ], [ 211, 213 ], [ 210, 214 ], [ 204, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 215, 219 ], [ 202, 220 ], [ 220, 221 ], [ 202, 222 ], [ 222, 223 ], [ 202, 224 ], [ 224, 225 ], [ 630, 226 ], [ 226, 227 ], [ 226, 228 ], [ 228, 229 ], [ 226, 230 ], [ 230, 231 ], [ 226, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 232, 238 ], [ 238, 239 ], [ 226, 240 ], [ 240, 241 ], [ 240, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 226, 246 ], [ 246, 247 ], [ 246, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 250, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 249, 258 ], [ 258, 259 ], [ 258, 260 ], [ 248, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 226, 265 ], [ 265, 266 ], [ 265, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 269, 272 ], [ 272, 273 ], [ 226, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 278, 281 ], [ 281, 282 ], [ 226, 283 ], [ 283, 284 ], [ 283, 285 ], [ 285, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 287, 290 ], [ 290, 291 ], [ 226, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 295, 296 ], [ 296, 297 ], [ 297, 298 ], [ 630, 299 ], [ 299, 300 ], [ 299, 301 ], [ 301, 302 ], [ 301, 303 ], [ 303, 304 ], [ 303, 305 ], [ 299, 306 ], [ 306, 307 ], [ 299, 308 ], [ 308, 309 ], [ 299, 310 ], [ 310, 311 ], [ 299, 312 ], [ 312, 313 ], [ 299, 314 ], [ 314, 315 ], [ 314, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 316, 320 ], [ 320, 321 ], [ 320, 322 ], [ 316, 324 ], [ 324, 325 ], [ 324, 326 ], [ 326, 327 ], [ 326, 328 ], [ 299, 329 ], [ 329, 330 ], [ 329, 331 ], [ 331, 332 ], [ 332, 333 ], [ 332, 334 ], [ 331, 335 ], [ 335, 336 ], [ 335, 337 ], [ 331, 339 ], [ 339, 340 ], [ 339, 341 ], [ 341, 342 ], [ 341, 343 ], [ 329, 344 ], [ 344, 345 ], [ 299, 346 ], [ 346, 347 ], [ 346, 348 ], [ 348, 349 ], [ 349, 350 ], [ 349, 351 ], [ 348, 353 ], [ 353, 354 ], [ 353, 355 ], [ 348, 356 ], [ 356, 357 ], [ 348, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 359, 364 ], [ 364, 365 ], [ 358, 366 ], [ 366, 367 ], [ 367, 368 ], [ 368, 369 ], [ 368, 370 ], [ 367, 371 ], [ 366, 372 ], [ 372, 373 ], [ 373, 374 ], [ 373, 375 ], [ 375, 376 ], [ 372, 377 ], [ 348, 378 ], [ 378, 379 ], [ 299, 380 ], [ 380, 381 ], [ 380, 382 ], [ 382, 383 ], [ 383, 384 ], [ 383, 385 ], [ 382, 386 ], [ 386, 387 ], [ 386, 388 ], [ 388, 389 ], [ 382, 390 ], [ 390, 391 ], [ 391, 392 ], [ 391, 393 ], [ 390, 394 ], [ 394, 395 ], [ 394, 396 ], [ 396, 397 ], [ 382, 398 ], [ 398, 399 ], [ 398, 400 ], [ 400, 401 ], [ 400, 402 ], [ 382, 403 ], [ 403, 404 ], [ 403, 405 ], [ 405, 406 ], [ 405, 407 ], [ 407, 408 ], [ 382, 409 ], [ 409, 410 ], [ 410, 411 ], [ 411, 412 ], [ 412, 413 ], [ 412, 414 ], [ 414, 415 ], [ 411, 416 ], [ 410, 417 ], [ 417, 418 ], [ 417, 419 ], [ 409, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 423, 424 ], [ 424, 425 ], [ 425, 426 ], [ 425, 427 ], [ 424, 428 ], [ 423, 429 ], [ 382, 430 ], [ 430, 431 ], [ 430, 432 ], [ 432, 433 ], [ 433, 434 ], [ 382, 435 ], [ 435, 436 ], [ 299, 437 ], [ 437, 438 ], [ 437, 439 ], [ 439, 440 ], [ 440, 441 ], [ 440, 442 ], [ 439, 443 ], [ 443, 444 ], [ 443, 445 ], [ 445, 446 ], [ 439, 447 ], [ 447, 448 ], [ 448, 449 ], [ 448, 450 ], [ 447, 451 ], [ 451, 452 ], [ 451, 453 ], [ 453, 454 ], [ 439, 455 ], [ 455, 456 ], [ 455, 457 ], [ 457, 458 ], [ 457, 459 ], [ 439, 460 ], [ 460, 461 ], [ 460, 462 ], [ 462, 463 ], [ 462, 464 ], [ 464, 465 ], [ 439, 466 ], [ 466, 467 ], [ 467, 468 ], [ 468, 469 ], [ 469, 470 ], [ 469, 471 ], [ 471, 472 ], [ 468, 473 ], [ 467, 474 ], [ 474, 475 ], [ 474, 476 ], [ 466, 477 ], [ 477, 478 ], [ 478, 479 ], [ 478, 480 ], [ 480, 481 ], [ 481, 482 ], [ 482, 483 ], [ 482, 484 ], [ 481, 485 ], [ 480, 486 ], [ 439, 487 ], [ 487, 488 ], [ 487, 489 ], [ 489, 490 ], [ 490, 491 ], [ 439, 492 ], [ 492, 493 ], [ 299, 494 ], [ 494, 495 ], [ 494, 496 ], [ 496, 497 ], [ 497, 498 ], [ 497, 499 ], [ 496, 500 ], [ 500, 501 ], [ 500, 502 ], [ 496, 503 ], [ 503, 504 ], [ 503, 505 ], [ 505, 506 ], [ 496, 507 ], [ 507, 508 ], [ 508, 509 ], [ 508, 510 ], [ 507, 511 ], [ 511, 512 ], [ 511, 513 ], [ 513, 514 ], [ 496, 515 ], [ 515, 516 ], [ 515, 517 ], [ 517, 518 ], [ 517, 519 ], [ 496, 520 ], [ 520, 521 ], [ 520, 522 ], [ 522, 523 ], [ 522, 524 ], [ 524, 525 ], [ 496, 526 ], [ 526, 527 ], [ 527, 528 ], [ 528, 529 ], [ 529, 530 ], [ 529, 531 ], [ 531, 532 ], [ 528, 533 ], [ 527, 534 ], [ 534, 535 ], [ 534, 536 ], [ 526, 537 ], [ 537, 538 ], [ 538, 539 ], [ 538, 540 ], [ 540, 541 ], [ 541, 542 ], [ 542, 543 ], [ 542, 544 ], [ 541, 545 ], [ 540, 546 ], [ 496, 547 ], [ 547, 548 ], [ 548, 549 ], [ 548, 550 ], [ 547, 551 ], [ 551, 552 ], [ 552, 553 ], [ 553, 554 ], [ 554, 555 ], [ 555, 556 ], [ 555, 557 ], [ 557, 558 ], [ 554, 559 ], [ 553, 560 ], [ 560, 561 ], [ 560, 562 ], [ 552, 563 ], [ 563, 564 ], [ 564, 565 ], [ 564, 566 ], [ 566, 567 ], [ 567, 568 ], [ 567, 569 ], [ 566, 570 ], [ 570, 571 ], [ 570, 572 ], [ 496, 573 ], [ 573, 574 ], [ 573, 575 ], [ 575, 576 ], [ 576, 577 ], [ 496, 578 ], [ 578, 579 ], [ 299, 580 ], [ 580, 581 ], [ 580, 582 ], [ 582, 583 ], [ 583, 584 ], [ 583, 585 ], [ 585, 586 ], [ 586, 587 ], [ 585, 588 ], [ 585, 589 ], [ 589, 590 ], [ 589, 591 ], [ 585, 592 ], [ 582, 593 ], [ 593, 594 ], [ 594, 595 ], [ 594, 596 ], [ 596, 597 ], [ 593, 598 ], [ 598, 599 ], [ 599, 600 ], [ 599, 601 ], [ 598, 602 ], [ 602, 603 ], [ 299, 604 ], [ 604, 605 ], [ 604, 606 ], [ 606, 607 ], [ 607, 608 ], [ 608, 609 ], [ 608, 610 ], [ 607, 611 ], [ 611, 612 ], [ 606, 613 ], [ 613, 614 ], [ 614, 615 ], [ 614, 616 ], [ 616, 617 ], [ 299, 618 ], [ 618, 619 ], [ 618, 620 ], [ 620, 621 ], [ 621, 622 ], [ 622, 623 ], [ 622, 624 ], [ 621, 625 ], [ 620, 626 ], [ 626, 627 ], [ 627, 628 ], [ 0, 629 ], [ 629, 630 ], [ 629, 631 ] ]
[ "import java.io.*;\nimport java.util.ArrayList;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n\n new Main().go();\n }\n\n PrintWriter out;\n Reader in;\n BufferedReader br;\n\n Main() throws IOException {\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }\n\n void go() throws Exception {\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }\n\n\n int inf = 2000000000;\n int mod = 1000000007;\n double eps = 0.000000001;\n\n int n;\n int m;\n\n ArrayList<Integer>[] g;\n void solve() throws IOException {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }\n\n static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {\n\n public final A a;\n public final B b;\n\n Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }\n\n public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }\n }\n\n class Item {\n\n int a;\n int b;\n int c;\n\n Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n }\n\n\n class Reader {\n\n BufferedReader br;\n StringTokenizer tok;\n\n Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }\n\n Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }\n\n String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }\n\n int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }\n\n long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }\n\n double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }\n\n\n String nextLine() throws IOException {\n return br.readLine();\n }\n\n }\n\n static class InputReader\n {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n }\n\n}", "import java.io.*;", "io.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n new Main().go();\n }\n\n PrintWriter out;\n Reader in;\n BufferedReader br;\n\n Main() throws IOException {\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }\n\n void go() throws Exception {\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }\n\n\n int inf = 2000000000;\n int mod = 1000000007;\n double eps = 0.000000001;\n\n int n;\n int m;\n\n ArrayList<Integer>[] g;\n void solve() throws IOException {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }\n\n static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {\n\n public final A a;\n public final B b;\n\n Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }\n\n public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }\n }\n\n class Item {\n\n int a;\n int b;\n int c;\n\n Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n }\n\n\n class Reader {\n\n BufferedReader br;\n StringTokenizer tok;\n\n Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }\n\n Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }\n\n String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }\n\n int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }\n\n long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }\n\n double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }\n\n\n String nextLine() throws IOException {\n return br.readLine();\n }\n\n }\n\n static class InputReader\n {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n }\n\n}", "Main", "PrintWriter out;", "out", "Reader in;", "in", "BufferedReader br;", "br", "int inf = 2000000000;", "inf", "2000000000", "int mod = 1000000007;", "mod", "1000000007", "double eps = 0.000000001;", "eps", "0.000000001", "int n;", "n", "int m;", "m", "ArrayList<Integer>[] g;", "g", "public static void main(String[] args) throws Exception {\n\n new Main().go();\n }", "main", "{\n\n new Main().go();\n }", "new Main().go()", "new Main().go", "new Main()", "String[] args", "args", "Main() throws IOException {\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }", "Main", "{\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }", "try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }", "catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }", "Exception e", "{\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }", "in = new Reader()", "in", "new Reader()", "out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) )", "out", "new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) )", "{\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }", "in = new Reader(\"input.txt\")", "in", "new Reader(\"input.txt\")", "out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) )", "out", "new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) )", "void go() throws Exception {\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }", "go", "{\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }", "int t = 1;", "t", "1", "while (t > 0) {\n solve();\n t--;\n }", "t > 0", "t", "0", "{\n solve();\n t--;\n }", "solve()", "solve", "t--", "t", "out.flush()", "out.flush", "out", "out.close()", "out.close", "out", "void solve() throws IOException {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }", "solve", "{\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }", "int a = in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "int b = in.nextInt();", "b", "in.nextInt()", "in.nextInt", "in", "int c = in.nextInt();", "c", "in.nextInt()", "in.nextInt", "in", "int k = in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "int sum = 0;", "sum", "0", "sum += Math.min(a, k)", "sum", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= Math.min(a, k)", "k", "Math.min(a, k)", "Math.min", "Math", "a", "k", "k -= Math.min(b, k)", "k", "Math.min(b, k)", "Math.min", "Math", "b", "k", "sum += Math.min(c, k) * -1", "sum", "Math.min(c, k) * -1", "Math.min(c, k)", "Math.min", "Math", "c", "k", "-1", "1", "out.println(sum)", "out.println", "out", "sum", "static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {\n\n public final A a;\n public final B b;\n\n Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }\n\n public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }\n }", "Pair", "public final A a;", "a", "public final B b;", "b", "Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }", "Pair", "{\n this.a = a;\n this.b = b;\n }", "this.a = a", "this.a", "this", "this.a", "a", "this.b = b", "this.b", "this", "this.b", "b", "A a", "a", "B b", "b", "public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }", "compareTo", "{\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }", "if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);", "!a.equals(p.a)", "a.equals(p.a)", "a.equals", "a", "p.a", "p", "p.a", "return a.compareTo(p.a);", "a.compareTo(p.a)", "a.compareTo", "a", "p.a", "p", "p.a", "return b.compareTo(p.b);", "b.compareTo(p.b)", "b.compareTo", "b", "p.b", "p", "p.b", "Pair<A, B> p", "p", "Comparable", "class Item {\n\n int a;\n int b;\n int c;\n\n Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n }", "Item", "int a;", "a", "int b;", "b", "int c;", "c", "Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }", "Item", "{\n this.a = a;\n this.b = b;\n this.c = c;\n }", "this.a = a", "this.a", "this", "this.a", "a", "this.b = b", "this.b", "this", "this.b", "b", "this.c = c", "this.c", "this", "this.c", "c", "int a", "a", "int b", "b", "int c", "c", "class Reader {\n\n BufferedReader br;\n StringTokenizer tok;\n\n Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }\n\n Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }\n\n String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }\n\n int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }\n\n long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }\n\n double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }\n\n\n String nextLine() throws IOException {\n return br.readLine();\n }\n\n }", "Reader", "BufferedReader br;", "br", "StringTokenizer tok;", "tok", "Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }", "Reader", "{\n br = new BufferedReader( new FileReader(file) );\n }", "br = new BufferedReader( new FileReader(file) )", "br", "new BufferedReader( new FileReader(file) )", "String file", "file", "Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }", "Reader", "{\n br = new BufferedReader( new InputStreamReader(System.in) );\n }", "br = new BufferedReader( new InputStreamReader(System.in) )", "br", "new BufferedReader( new InputStreamReader(System.in) )", "String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }", "next", "{\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }", "while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());", "tok == null || !tok.hasMoreElements()", "tok == null", "tok", "null", "!tok.hasMoreElements()", "tok.hasMoreElements()", "tok.hasMoreElements", "tok", "tok = new StringTokenizer(br.readLine())", "tok", "new StringTokenizer(br.readLine())", "return tok.nextToken();", "tok.nextToken()", "tok.nextToken", "tok", "int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }", "nextInt", "{\n return Integer.valueOf(next());\n }", "return Integer.valueOf(next());", "Integer.valueOf(next())", "Integer.valueOf", "Integer", "next()", "next", "long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }", "nextLong", "{\n return Long.valueOf(next());\n }", "return Long.valueOf(next());", "Long.valueOf(next())", "Long.valueOf", "Long", "next()", "next", "double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }", "nextDouble", "{\n return Double.valueOf(next());\n }", "return Double.valueOf(next());", "Double.valueOf(next())", "Double.valueOf", "Double", "next()", "next", "String nextLine() throws IOException {\n return br.readLine();\n }", "nextLine", "{\n return br.readLine();\n }", "return br.readLine();", "br.readLine()", "br.readLine", "br", "static class InputReader\n {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n }", "InputReader", "final private int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private DataInputStream din;", "din", "private byte[] buffer;", "buffer", "private int bufferPointer", "bufferPointer", "bytesRead;", "bytesRead", "public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "InputReader", "{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(System.in)", "din", "new DataInputStream(System.in)", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "InputReader", "{\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(new FileInputStream(file_name))", "din", "new DataInputStream(new FileInputStream(file_name))", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "String file_name", "file_name", "public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "readLine", "{\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "byte[] buf = new byte[64];", "buf", "new byte[64]", "64", "int cnt = 0", "cnt", "0", "c;", "c", "while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "(c = read()) != -1", "(c = read())", "c", "read()", "read", "-1", "1", "{\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "if (c == '\\n')\n break;", "c == '\\n'", "c", "'\\n'", "break;", "buf[cnt++] = (byte) c", "buf[cnt++]", "buf", "cnt++", "cnt", "(byte) c", "return new String(buf, 0, cnt);", "new String(buf, 0, cnt)", "public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "nextInt", "{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "int ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "nextLong", "{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "long ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "nextDouble", "{\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "double ret = 0", "ret", "0", "div = 1;", "div", "1", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }", "c == '.'", "c", "'.'", "{\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }", "while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret += (c - '0') / (div *= 10);\n }", "ret += (c - '0') / (div *= 10)", "ret", "(c - '0') / (div *= 10)", "(c - '0')", "c", "'0'", "(div *= 10)", "div", "10", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "fillBuffer", "{\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "bytesRead", "din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "din.read", "din", "buffer", "bufferPointer = 0", "bufferPointer", "0", "BUFFER_SIZE", "if (bytesRead == -1)\n buffer[0] = -1;", "bytesRead == -1", "bytesRead", "-1", "1", "buffer[0] = -1", "buffer[0]", "buffer", "0", "-1", "1", "private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead)\n fillBuffer();", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }", "close", "{\n if (din == null)\n return;\n din.close();\n }", "if (din == null)\n return;", "din == null", "din", "null", "return;", "din.close()", "din.close", "din", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n new Main().go();\n }\n\n PrintWriter out;\n Reader in;\n BufferedReader br;\n\n Main() throws IOException {\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }\n\n void go() throws Exception {\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }\n\n\n int inf = 2000000000;\n int mod = 1000000007;\n double eps = 0.000000001;\n\n int n;\n int m;\n\n ArrayList<Integer>[] g;\n void solve() throws IOException {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }\n\n static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {\n\n public final A a;\n public final B b;\n\n Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }\n\n public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }\n }\n\n class Item {\n\n int a;\n int b;\n int c;\n\n Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n }\n\n\n class Reader {\n\n BufferedReader br;\n StringTokenizer tok;\n\n Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }\n\n Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }\n\n String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }\n\n int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }\n\n long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }\n\n double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }\n\n\n String nextLine() throws IOException {\n return br.readLine();\n }\n\n }\n\n static class InputReader\n {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n }\n\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n new Main().go();\n }\n\n PrintWriter out;\n Reader in;\n BufferedReader br;\n\n Main() throws IOException {\n\n try {\n\n //br = new BufferedReader( new FileReader(\"input.txt\") );\n //in = new Reader(\"input.txt\");\n in = new Reader(\"input.txt\");\n out = new PrintWriter( new BufferedWriter(new FileWriter(\"output.txt\")) );\n }\n catch (Exception e) {\n\n //br = new BufferedReader( new InputStreamReader( System.in ) );\n in = new Reader();\n out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );\n }\n }\n\n void go() throws Exception {\n\n //int t = in.nextInt();\n int t = 1;\n while (t > 0) {\n solve();\n t--;\n }\n\n out.flush();\n out.close();\n }\n\n\n int inf = 2000000000;\n int mod = 1000000007;\n double eps = 0.000000001;\n\n int n;\n int m;\n\n ArrayList<Integer>[] g;\n void solve() throws IOException {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n sum += Math.min(a, k);\n k -= Math.min(a, k);\n k -= Math.min(b, k);\n sum += Math.min(c, k) * -1;\n out.println(sum);\n }\n\n static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {\n\n public final A a;\n public final B b;\n\n Pair(A a, B b) {\n this.a = a;\n this.b = b;\n }\n\n public int compareTo(Pair<A, B> p) {\n if (!a.equals(p.a))\n return a.compareTo(p.a);\n else\n return b.compareTo(p.b);\n }\n }\n\n class Item {\n\n int a;\n int b;\n int c;\n\n Item(int a, int b, int c) {\n this.a = a;\n this.b = b;\n this.c = c;\n }\n\n }\n\n\n class Reader {\n\n BufferedReader br;\n StringTokenizer tok;\n\n Reader(String file) throws IOException {\n br = new BufferedReader( new FileReader(file) );\n }\n\n Reader() throws IOException {\n br = new BufferedReader( new InputStreamReader(System.in) );\n }\n\n String next() throws IOException {\n\n while (tok == null || !tok.hasMoreElements())\n tok = new StringTokenizer(br.readLine());\n return tok.nextToken();\n }\n\n int nextInt() throws NumberFormatException, IOException {\n return Integer.valueOf(next());\n }\n\n long nextLong() throws NumberFormatException, IOException {\n return Long.valueOf(next());\n }\n\n double nextDouble() throws NumberFormatException, IOException {\n return Double.valueOf(next());\n }\n\n\n String nextLine() throws IOException {\n return br.readLine();\n }\n\n }\n\n static class InputReader\n {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public InputReader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public InputReader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n }\n\n}", "Main" ]
import java.io.*; import java.util.ArrayList; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws Exception { new Main().go(); } PrintWriter out; Reader in; BufferedReader br; Main() throws IOException { try { //br = new BufferedReader( new FileReader("input.txt") ); //in = new Reader("input.txt"); in = new Reader("input.txt"); out = new PrintWriter( new BufferedWriter(new FileWriter("output.txt")) ); } catch (Exception e) { //br = new BufferedReader( new InputStreamReader( System.in ) ); in = new Reader(); out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) ); } } void go() throws Exception { //int t = in.nextInt(); int t = 1; while (t > 0) { solve(); t--; } out.flush(); out.close(); } int inf = 2000000000; int mod = 1000000007; double eps = 0.000000001; int n; int m; ArrayList<Integer>[] g; void solve() throws IOException { int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int k = in.nextInt(); int sum = 0; sum += Math.min(a, k); k -= Math.min(a, k); k -= Math.min(b, k); sum += Math.min(c, k) * -1; out.println(sum); } static class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> { public final A a; public final B b; Pair(A a, B b) { this.a = a; this.b = b; } public int compareTo(Pair<A, B> p) { if (!a.equals(p.a)) return a.compareTo(p.a); else return b.compareTo(p.b); } } class Item { int a; int b; int c; Item(int a, int b, int c) { this.a = a; this.b = b; this.c = c; } } class Reader { BufferedReader br; StringTokenizer tok; Reader(String file) throws IOException { br = new BufferedReader( new FileReader(file) ); } Reader() throws IOException { br = new BufferedReader( new InputStreamReader(System.in) ); } String next() throws IOException { while (tok == null || !tok.hasMoreElements()) tok = new StringTokenizer(br.readLine()); return tok.nextToken(); } int nextInt() throws NumberFormatException, IOException { return Integer.valueOf(next()); } long nextLong() throws NumberFormatException, IOException { return Long.valueOf(next()); } double nextDouble() throws NumberFormatException, IOException { return Double.valueOf(next()); } String nextLine() throws IOException { return br.readLine(); } } static class InputReader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public InputReader() { din = new DataInputStream(System.in); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public InputReader(String file_name) throws IOException { din = new DataInputStream(new FileInputStream(file_name)); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public String readLine() throws IOException { byte[] buf = new byte[64]; // line length int cnt = 0, c; while ((c = read()) != -1) { if (c == '\n') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public int nextInt() throws IOException { int ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public long nextLong() throws IOException { long ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public double nextDouble() throws IOException { double ret = 0, div = 1; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } } if (neg) return -ret; return ret; } private void fillBuffer() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } private byte read() throws IOException { if (bufferPointer == bytesRead) fillBuffer(); return buffer[bufferPointer++]; } public void close() throws IOException { if (din == null) return; din.close(); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 29, 13, 14, 2, 13, 2, 13, 13, 29, 13, 29, 2, 13, 2, 2, 13, 13, 13, 23, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 15, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 6, 31 ], [ 31, 32 ], [ 6, 33 ], [ 33, 34 ], [ 6, 35 ], [ 35, 36 ], [ 6, 37 ], [ 37, 38 ], [ 79, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 41, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 41, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 41, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 41, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 70, 74 ], [ 70, 75 ], [ 39, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n static int f(int a, int b, int c, int k) {\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }\n \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n static int f(int a, int b, int c, int k) {\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }\n \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }\n}", "Main", "static int f(int a, int b, int c, int k) {\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }", "f", "{\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }", "if (k <= a) return k;", "k <= a", "k", "a", "return k;", "k", "if (k <= a + b) return a;", "k <= a + b", "k", "a + b", "a", "b", "return a;", "a", "return a - (k - a - b);", "a - (k - a - b)", "a", "(k - a - b)", "k - a - b", "k", "a", "b", "int a", "a", "int b", "b", "int c", "c", "int k", "k", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }", "main", "{\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int a = in.nextInt()", "a", "in.nextInt()", "in.nextInt", "in", "b = in.nextInt()", "b", "in.nextInt()", "in.nextInt", "in", "c = in.nextInt()", "c", "in.nextInt()", "in.nextInt", "in", "k = in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "System.out.println(f(a, b, c, k))", "System.out.println", "System.out", "System", "System.out", "f(a, b, c, k)", "f", "a", "b", "c", "k", "String[] args", "args", "public class Main {\n\n static int f(int a, int b, int c, int k) {\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }\n \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }\n}", "public class Main {\n\n static int f(int a, int b, int c, int k) {\n if (k <= a) return k;\n if (k <= a + b) return a;\n return a - (k - a - b);\n }\n \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt();\n System.out.println(f(a, b, c, k));\n }\n}", "Main" ]
import java.util.Scanner; public class Main { static int f(int a, int b, int c, int k) { if (k <= a) return k; if (k <= a + b) return a; return a - (k - a - b); } public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), k = in.nextInt(); System.out.println(f(a, b, c, k)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 13, 2, 2, 2, 13, 13, 13, 13, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 13, 30, 0, 13, 2, 13, 17, 14, 2, 2, 2, 13, 13, 13, 13, 30, 0, 13, 2, 13, 2, 2, 2, 13, 13, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 40, 46 ], [ 35, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 35, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 66, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 66, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 79, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 91, 97 ], [ 97, 98 ], [ 8, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 6, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}", "Scanner scanner=new Scanner(System.in);", "scanner", "new Scanner(System.in)", "long a=scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "long b=scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "long c=scanner.nextInt();", "c", "scanner.nextInt()", "scanner.nextInt", "scanner", "long k=scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "long sum=0;", "sum", "0", "if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }", "k>=a&&(k-a-b)>c", "k>=a", "k", "a", "(k-a-b)>c", "(k-a-b)", "k-a-b", "k", "a", "b", "c", "{\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }", "sum=a*1", "sum", "a*1", "a", "1", "k=k-a", "k", "k-a", "k", "a", "if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }", "k<a", "k", "a", "{\n \t\t sum=k;\n \t }", "sum=k", "sum", "k", "if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }", "(k-a)<=b", "(k-a)", "k", "a", "b", "{\n \t\t sum=a*1;\n \t }", "sum=a*1", "sum", "a*1", "a", "1", "if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }", "(k-a-b)<=c", "(k-a-b)", "k-a-b", "k", "a", "b", "c", "{\n \t\t sum=a+(k-a-b)*(-1);\n \t }", "sum=a+(k-a-b)*(-1)", "sum", "a+(k-a-b)*(-1)", "a", "(k-a-b)*(-1)", "(k-a-b)", "k-a-b", "k", "a", "b", "(-1)", "1", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scanner=new Scanner(System.in);\n long a=scanner.nextInt();\n long b=scanner.nextInt();\n long c=scanner.nextInt();\n long k=scanner.nextInt();\n long sum=0;\n \n \t if(k>=a&&(k-a-b)>c) {\n \t\t sum=a*1;\n \t\t k=k-a;\n \t }\n \t else if(k<a) {\n \t\t sum=k;\n \t }\n \t else if((k-a)<=b) {\n \t\t sum=a*1;\n \t }\n \t else if((k-a-b)<=c) {\n \t\t sum=a+(k-a-b)*(-1);\n \t }\n \tSystem.out.println(sum);\n \t \n \n \n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scanner=new Scanner(System.in); long a=scanner.nextInt(); long b=scanner.nextInt(); long c=scanner.nextInt(); long k=scanner.nextInt(); long sum=0; if(k>=a&&(k-a-b)>c) { sum=a*1; k=k-a; } else if(k<a) { sum=k; } else if((k-a)<=b) { sum=a*1; } else if((k-a-b)<=c) { sum=a+(k-a-b)*(-1); } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 2, 2, 13, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 43, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 57, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 6, 79 ], [ 79, 80 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \tint A = sc.nextInt();\n int B = sc.nextInt();\n \tint C = sc.nextInt();\n \tint K = sc.nextInt();\n \tint count=0;\n \n \tif(A>=K){\n count=K;\n }\n \telse if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}\n \n System.out.println(count);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \tint A = sc.nextInt();\n int B = sc.nextInt();\n \tint C = sc.nextInt();\n \tint K = sc.nextInt();\n \tint count=0;\n \n \tif(A>=K){\n count=K;\n }\n \telse if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}\n \n System.out.println(count);\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \tint A = sc.nextInt();\n int B = sc.nextInt();\n \tint C = sc.nextInt();\n \tint K = sc.nextInt();\n \tint count=0;\n \n \tif(A>=K){\n count=K;\n }\n \telse if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}\n \n System.out.println(count);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n \tint A = sc.nextInt();\n int B = sc.nextInt();\n \tint C = sc.nextInt();\n \tint K = sc.nextInt();\n \tint count=0;\n \n \tif(A>=K){\n count=K;\n }\n \telse if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}\n \n System.out.println(count);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int count=0;", "count", "0", "if(A>=K){\n count=K;\n }\n \telse if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}", "A>=K", "A", "K", "{\n count=K;\n }", "count=K", "count", "K", "if(A<K&&A+B>=K){\n count=A;}\n else if(A+B<K){\n count=A-(K-A-B);}", "A<K&&A+B>=K", "A<K", "A", "K", "A+B>=K", "A+B", "A", "B", "K", "{\n count=A;}", "count=A", "count", "A", "if(A+B<K){\n count=A-(K-A-B);}", "A+B<K", "A+B", "A", "B", "K", "{\n count=A-(K-A-B);}", "count=A-(K-A-B)", "count", "A-(K-A-B)", "A", "(K-A-B)", "K-A-B", "K", "A", "B", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String args[]", "args" ]
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int count=0; if(A>=K){ count=K; } else if(A<K&&A+B>=K){ count=A;} else if(A+B<K){ count=A-(K-A-B);} System.out.println(count); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 17, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 17, 0, 13, 13, 30, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 2, 17, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 8, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 40, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 8, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 82, 88 ], [ 88, 89 ], [ 88, 90 ], [ 78, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 8, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 6, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }\n}", "Main", "public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a", "a", "b", "b", "c", "c", "k;", "k", "a = sc.nextInt()", "a", "sc.nextInt()", "sc.nextInt", "sc", "b = sc.nextInt()", "b", "sc.nextInt()", "sc.nextInt", "sc", "c = sc.nextInt()", "c", "sc.nextInt()", "sc.nextInt", "sc", "k = sc.nextInt()", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sn = 0 ;", "sn", "0", "if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }", "a<=k", "a", "k", "{\n sn += a*1;\n k -= a;\n }", "sn += a*1", "sn", "a*1", "a", "1", "k -= a", "k", "a", "{\n sn += k;\n k -= k;\n }", "sn += k", "sn", "k", "k -= k", "k", "k", "if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }", "b<=k", "b", "k", "{\n sn += 0;\n k -= b;\n }", "sn += 0", "sn", "0", "k -= b", "k", "b", "{\n k -= k;\n }", "k -= k", "k", "k", "if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }", "c<=k", "c", "k", "{\n sn -= 1*c;\n k -= c;\n }", "sn -= 1*c", "sn", "1*c", "1", "c", "k -= c", "k", "c", "{\n sn -= k;\n k -= k;\n }", "sn -= k", "sn", "k", "k -= k", "k", "k", "System.out.println(sn)", "System.out.println", "System.out", "System", "System.out", "sn", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }\n}", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int a,b,c,k;\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n k = sc.nextInt();\n \n int sn = 0 ;\n \n if(a<=k){\n sn += a*1;\n k -= a;\n }\n else{\n sn += k;\n k -= k;\n }\n \n if(b<=k){\n sn += 0;\n k -= b;\n }\n else{\n k -= k;\n }\n \n if(c<=k){\n sn -= 1*c;\n k -= c;\n }\n else{\n sn -= k;\n k -= k;\n }\n \n System.out.println(sn);\n \n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a,b,c,k; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); k = sc.nextInt(); int sn = 0 ; if(a<=k){ sn += a*1; k -= a; } else{ sn += k; k -= k; } if(b<=k){ sn += 0; k -= b; } else{ k -= k; } if(c<=k){ sn -= 1*c; k -= c; } else{ sn -= k; k -= k; } System.out.println(sn); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 13, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 13, 0, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 8, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 49, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 41, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 74, 90 ], [ 90, 91 ], [ 90, 92 ], [ 8, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 101, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 122, 124 ], [ 8, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 130, 131 ], [ 130, 132 ], [ 125, 133 ], [ 133, 134 ], [ 134, 135 ], [ 125, 136 ], [ 137, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 8, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 6, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}\n}", "Main", "public static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int c = scan.nextInt();", "c", "scan.nextInt()", "scan.nextInt", "scan", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int anser = 0;", "anser", "0", "int k1 = 0;", "k1", "0", "int k2 = 0;", "k2", "0", "if(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}", "k>a || k==a", "k>a", "k", "a", "k==a", "k", "a", "{\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}", "for(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<a", "i", "a", "i++", "i++", "i", "{\n\t\t\tanser++;\n\t\t}", "{\n\t\t\tanser++;\n\t\t}", "anser++", "anser", "k1 = k-a", "k1", "k-a", "k", "a", "if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}", "a>k", "a", "k", "{\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}", "for(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<k", "i", "k", "i++", "i++", "i", "{\n\t\t\tanser++;\n\t\t}", "{\n\t\t\tanser++;\n\t\t}", "anser++", "anser", "k1 = 0", "k1", "0", "if(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}", "k1>b || k1==b", "k1>b", "k1", "b", "k1==b", "k1", "b", "{\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}", "for(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<b", "i", "b", "i++", "i++", "i", "{\n\t\t\tanser = anser + 0;\n\t\t}", "{\n\t\t\tanser = anser + 0;\n\t\t}", "anser = anser + 0", "anser", "anser + 0", "anser", "0", "k2 = k1-b", "k2", "k1-b", "k1", "b", "for(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}", "int i=0;", "int i=0;", "i", "0", "i<k2", "i", "k2", "i++", "i++", "i", "{\n\t\t\tanser =anser -1;\n\t}", "{\n\t\t\tanser =anser -1;\n\t}", "anser =anser -1", "anser", "anser -1", "anser", "1", "System.out.println(anser)", "System.out.println", "System.out", "System", "System.out", "anser", "String[] args", "args", "public class Main{\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}\n}", "public class Main{\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\t\t// System.out.println(c);\n\n\t\t// int one[]=new int[a];\n\t\t// int zero[]=new int[b];\n\t\t// int minus[]=new int[c];\n\t\tint anser = 0;\n\n\t\tint k1 = 0;\n\t\tint k2 = 0;\n\t\t//int k3 = 0;\n\n\t\tif(k>a || k==a){\n\t\tfor(int i=0; i<a; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = k-a;\n\t}else if(a>k){\n\t\tfor(int i=0; i<k; i++){\n\t\t\tanser++;\n\t\t}\n\t\tk1 = 0;\n\t}\n\n\t\tif(k1>b || k1==b){\n\t\tfor(int i=0; i<b; i++){\n\t\t\tanser = anser + 0;\n\t\t}\n\t\tk2 = k1-b;\n\t}\n\t\tfor(int i=0; i<k2; i++){\n\t\t\tanser =anser -1;\n\t}\n\t\tSystem.out.println(anser);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int k = scan.nextInt(); // System.out.println(a); // System.out.println(b); // System.out.println(c); // int one[]=new int[a]; // int zero[]=new int[b]; // int minus[]=new int[c]; int anser = 0; int k1 = 0; int k2 = 0; //int k3 = 0; if(k>a || k==a){ for(int i=0; i<a; i++){ anser++; } k1 = k-a; }else if(a>k){ for(int i=0; i<k; i++){ anser++; } k1 = 0; } if(k1>b || k1==b){ for(int i=0; i<b; i++){ anser = anser + 0; } k2 = k1-b; } for(int i=0; i<k2; i++){ anser =anser -1; } System.out.println(anser); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 2, 2, 2, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 47, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 64, 69 ], [ 60, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}", "Scanner in=new Scanner(System.in);", "in", "new Scanner(System.in)", "int a=in.nextInt()", "a", "in.nextInt()", "in.nextInt", "in", "b=in.nextInt()", "b", "in.nextInt()", "in.nextInt", "in", "c=in.nextInt()", "c", "in.nextInt()", "in.nextInt", "in", "k=in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "int ans=0;", "ans", "0", "if(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}", "a>=k", "a", "k", "{\n\t\t\tSystem.out.println(k);\n\t\t}", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}", "if(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}", "a+b>=k", "a+b", "a", "b", "k", "{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}", "int x=a-k+a+b;", "x", "a-k+a+b", "a-k+a+b", "a-k", "a", "k", "a", "b", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner in=new Scanner(System.in);\n\t\tint a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n\t\tint ans=0;\n\t\tif(a>=k)\n\t\t{\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif(a+b>=k)\n\t\t\t{\n\t\t\t\tSystem.out.println(a);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint x=a-k+a+b;\n\t\t\t\tSystem.out.println(x);\n\t\t\t}\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args) { Scanner in=new Scanner(System.in); int a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt(); int ans=0; if(a>=k) { System.out.println(k); } else { if(a+b>=k) { System.out.println(a); } else { int x=a-k+a+b; System.out.println(x); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 2, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 2, 13, 2, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 56, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 6, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b=sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c=sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "if(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}", "a>=k", "a", "k", "{\n\t\t\tSystem.out.println(k);\n\t\t}", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}", "a+b>=k", "a+b", "a", "b", "k", "{\n\t\t\tSystem.out.println(a);\n\t\t}", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}", "k-=a", "k", "a", "k-=b", "k", "b", "System.out.println(a+(k*(-1)))", "System.out.println", "System.out", "System", "System.out", "a+(k*(-1))", "a", "(k*(-1))", "k", "(-1)", "1", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tint c=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\t\n\t\tif(a>=k){\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(a+b>=k){\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\telse {\n\t\t\tk-=a;\n\t\t\tk-=b;\n\t\t\tSystem.out.println(a+(k*(-1)));\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int k=sc.nextInt(); if(a>=k){ System.out.println(k); } else if(a+b>=k){ System.out.println(a); } else { k-=a; k-=b; System.out.println(a+(k*(-1))); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 28, 13, 13, 30, 30, 14, 2, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 3, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 16, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 23, 25 ], [ 16, 26 ], [ 26, 27 ], [ 27, 28 ], [ 16, 29 ], [ 30, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 52, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 61, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 61, 75 ], [ 75, 76 ], [ 75, 77 ], [ 61, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 56, 84 ], [ 84, 85 ], [ 8, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 6, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }\n\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int[] numList = new int[3];", "numList", "new int[3]", "3", "for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < numList.length", "i", "numList.length", "numList", "numList.length", "i++", "i++", "i", "{\n numList[i] = sc.nextInt();\n }", "{\n numList[i] = sc.nextInt();\n }", "numList[i] = sc.nextInt()", "numList[i]", "numList", "i", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "int count = 0;", "count", "0", "int cardNum = 1;", "cardNum", "1", "for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }", "int num", "numList", "{\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }", "{\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }", "if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }", "num > 0", "num", "0", "{\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }", "if (num > K) {\n num = K;\n }", "num > K", "num", "K", "{\n num = K;\n }", "num = K", "num", "K", "count += (cardNum * num)", "count", "(cardNum * num)", "cardNum", "num", "K -= num", "K", "num", "if (K == 0) {\n break;\n }", "K == 0", "K", "0", "{\n break;\n }", "break;", "cardNum--", "cardNum", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }\n\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n //A,B,C格納用配列\n int[] numList = new int[3];\n\n //入力値を配列に格納\n for (int i = 0; i < numList.length; i++) {\n numList[i] = sc.nextInt();\n }\n //取り出すカードの枚数: K\n int K = sc.nextInt();\n sc.close();\n\n //取り出したカードの総和\n int count = 0;\n //カードの数\n int cardNum = 1;\n\n for (int num : numList) {\n if (num > 0) {\n if (num > K) {\n num = K;\n }\n count += (cardNum * num);\n K -= num;\n if (K == 0) {\n break;\n }\n }\n cardNum--;\n }\n System.out.println(count);\n\n }\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); //A,B,C格納用配列 int[] numList = new int[3]; //入力値を配列に格納 for (int i = 0; i < numList.length; i++) { numList[i] = sc.nextInt(); } //取り出すカードの枚数: K int K = sc.nextInt(); sc.close(); //取り出したカードの総和 int count = 0; //カードの数 int cardNum = 1; for (int num : numList) { if (num > 0) { if (num > K) { num = K; } count += (cardNum * num); K -= num; if (K == 0) { break; } } cardNum--; } System.out.println(count); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 42, 52 ], [ 38, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 57, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 63, 70 ], [ 57, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 75, 75 ], [ 75, 76 ], [ 75, 77 ], [ 75, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 6, 85 ], [ 85, 86 ] ]
[ "import java.util.Scanner;\n \nclass Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n scanner.close();\n \n int sum = 0;\n if(a>=k){\n sum = k;\n System.out.println(sum);\n return;\n }else{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }\n }\n \n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n scanner.close();\n \n int sum = 0;\n if(a>=k){\n sum = k;\n System.out.println(sum);\n return;\n }else{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }\n }\n \n}", "Main", "public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n scanner.close();\n \n int sum = 0;\n if(a>=k){\n sum = k;\n System.out.println(sum);\n return;\n }else{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }\n }", "main", "{\n \n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n scanner.close();\n \n int sum = 0;\n if(a>=k){\n sum = k;\n System.out.println(sum);\n return;\n }else{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int a = scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "int b = scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "int c = scanner.nextInt();", "c", "scanner.nextInt()", "scanner.nextInt", "scanner", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "scanner.close()", "scanner.close", "scanner", "int sum = 0;", "sum", "0", "if(a>=k){\n sum = k;\n System.out.println(sum);\n return;\n }else{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }", "a>=k", "a", "k", "{\n sum = k;\n System.out.println(sum);\n return;\n }", "sum = k", "sum", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "{\n sum += a;\n if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }\n }", "sum += a", "sum", "a", "if(b>=k-a){\n System.out.println(sum);\n return;\n }else{\n sum -= k-a-b;\n System.out.println(sum);\n }", "b>=k-a", "b", "k-a", "k", "a", "{\n System.out.println(sum);\n return;\n }", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "{\n sum -= k-a-b;\n System.out.println(sum);\n }", "sum -= k-a-b", "sum", "k-a-b", "k-a-b", "k", "a", "b", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int k = scanner.nextInt(); scanner.close(); int sum = 0; if(a>=k){ sum = k; System.out.println(sum); return; }else{ sum += a; if(b>=k-a){ System.out.println(sum); return; }else{ sum -= k-a-b; System.out.println(sum); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 17, 13, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 17, 13, 2, 17, 13, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 30, 4, 18, 18, 13, 13, 2, 2, 17, 13, 2, 17, 13, 30, 4, 18, 18, 13, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 30, 4, 18, 18, 13, 13, 2, 17, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 8, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 8, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 8, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 52, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 61, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 79, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 102, 104 ], [ 88, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 110, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 130, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 134, 136 ], [ 130, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 119, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 151, 152 ], [ 151, 153 ], [ 106, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 155, 160 ], [ 161, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 165, 166 ], [ 165, 167 ], [ 161, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 48, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 173, 178 ], [ 178, 179 ], [ 178, 180 ], [ 6, 181 ], [ 181, 182 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String args[]){\n Scanner scan;\n int A;\n int B;\n int C;\n int K;\n int Aa;\n int Bb;\n int Cc;\n\n scan = new Scanner(System.in);\n A = scan.nextInt();\n B = scan.nextInt();\n C = scan.nextInt();\n K = scan.nextInt();\n\n if (K >= A){\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }else{\n System.out.println(1*K);\n }\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String args[]){\n Scanner scan;\n int A;\n int B;\n int C;\n int K;\n int Aa;\n int Bb;\n int Cc;\n\n scan = new Scanner(System.in);\n A = scan.nextInt();\n B = scan.nextInt();\n C = scan.nextInt();\n K = scan.nextInt();\n\n if (K >= A){\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }else{\n System.out.println(1*K);\n }\n\n }\n}", "Main", "public static void main(String args[]){\n Scanner scan;\n int A;\n int B;\n int C;\n int K;\n int Aa;\n int Bb;\n int Cc;\n\n scan = new Scanner(System.in);\n A = scan.nextInt();\n B = scan.nextInt();\n C = scan.nextInt();\n K = scan.nextInt();\n\n if (K >= A){\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }else{\n System.out.println(1*K);\n }\n\n }", "main", "{\n Scanner scan;\n int A;\n int B;\n int C;\n int K;\n int Aa;\n int Bb;\n int Cc;\n\n scan = new Scanner(System.in);\n A = scan.nextInt();\n B = scan.nextInt();\n C = scan.nextInt();\n K = scan.nextInt();\n\n if (K >= A){\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }else{\n System.out.println(1*K);\n }\n\n }", "Scanner scan;", "scan", "int A;", "A", "int B;", "B", "int C;", "C", "int K;", "K", "int Aa;", "Aa", "int Bb;", "Bb", "int Cc;", "Cc", "scan = new Scanner(System.in)", "scan", "new Scanner(System.in)", "A = scan.nextInt()", "A", "scan.nextInt()", "scan.nextInt", "scan", "B = scan.nextInt()", "B", "scan.nextInt()", "scan.nextInt", "scan", "C = scan.nextInt()", "C", "scan.nextInt()", "scan.nextInt", "scan", "K = scan.nextInt()", "K", "scan.nextInt()", "scan.nextInt", "scan", "if (K >= A){\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }else{\n System.out.println(1*K);\n }", "K >= A", "K", "A", "{\n Aa = A;\n K = K - Aa;\n if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }\n }", "Aa = A", "Aa", "A", "K = K - Aa", "K", "K - Aa", "K", "Aa", "if (K == 0){\n System.out.println (1*Aa);\n }else{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }", "K == 0", "K", "0", "{\n System.out.println (1*Aa);\n }", "System.out.println (1*Aa)", "System.out.println", "System.out", "System", "System.out", "1*Aa", "1", "Aa", "{\n if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }\n }", "if ( K >= B){\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }", "K >= B", "K", "B", "{\n Bb = B;\n K = K - Bb;\n if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }\n }", "Bb = B", "Bb", "B", "K = K - Bb", "K", "K - Bb", "K", "Bb", "if (K == 0){\n System.out.println(1*Aa + 0*Bb);\n }else {\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }", "K == 0", "K", "0", "{\n System.out.println(1*Aa + 0*Bb);\n }", "System.out.println(1*Aa + 0*Bb)", "System.out.println", "System.out", "System", "System.out", "1*Aa + 0*Bb", "1*Aa", "1", "Aa", "0*Bb", "0", "Bb", "{\n if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }\n }", "if (K >= C){\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }else{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }", "K >= C", "K", "C", "{\n Cc = C;\n K = K - Cc ;\n if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }\n }", "Cc = C", "Cc", "C", "K = K - Cc", "K", "K - Cc", "K", "Cc", "if(K == 0){\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }else{\n System.out.println(1*Aa + 0*K);\n }", "K == 0", "K", "0", "{\n System.out.println(1*Aa + 0*Bb + (-1*Cc));\n }", "System.out.println(1*Aa + 0*Bb + (-1*Cc))", "System.out.println", "System.out", "System", "System.out", "1*Aa + 0*Bb + (-1*Cc)", "1*Aa + 0*Bb + (-1*Cc)", "1*Aa", "1", "Aa", "0*Bb", "0", "Bb", "(-1*Cc)", "-1", "1", "Cc", "{\n System.out.println(1*Aa + 0*K);\n }", "System.out.println(1*Aa + 0*K)", "System.out.println", "System.out", "System", "System.out", "1*Aa + 0*K", "1*Aa", "1", "Aa", "0*K", "0", "K", "{\n System.out.println(1*Aa + 0*Bb + (-1*K));\n }", "System.out.println(1*Aa + 0*Bb + (-1*K))", "System.out.println", "System.out", "System", "System.out", "1*Aa + 0*Bb + (-1*K)", "1*Aa + 0*Bb + (-1*K)", "1*Aa", "1", "Aa", "0*Bb", "0", "Bb", "(-1*K)", "-1", "1", "K", "{\n System.out.println(1*K);\n }", "System.out.println(1*K)", "System.out.println", "System.out", "System", "System.out", "1*K", "1", "K", "String args[]", "args" ]
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner scan; int A; int B; int C; int K; int Aa; int Bb; int Cc; scan = new Scanner(System.in); A = scan.nextInt(); B = scan.nextInt(); C = scan.nextInt(); K = scan.nextInt(); if (K >= A){ Aa = A; K = K - Aa; if (K == 0){ System.out.println (1*Aa); }else{ if ( K >= B){ Bb = B; K = K - Bb; if (K == 0){ System.out.println(1*Aa + 0*Bb); }else { if (K >= C){ Cc = C; K = K - Cc ; if(K == 0){ System.out.println(1*Aa + 0*Bb + (-1*Cc)); }else{ System.out.println(1*Aa + 0*K); } }else{ System.out.println(1*Aa + 0*Bb + (-1*K)); } } } } }else{ System.out.println(1*K); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 2, 13, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 6 ], [ 6, 7 ], [ 107, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 10, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 10, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 10, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 10, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 30, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 41, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 41, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 8, 67 ], [ 67, 68 ], [ 107, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 107, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 107, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 94, 95 ], [ 107, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main", "static Scanner scanner;", "scanner", "public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}", "main", "{\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}", "scanner = new Scanner(System.in)", "scanner", "new Scanner(System.in)", "int A=gi();", "A", "gi()", "gi", "int B=gi();", "B", "gi()", "gi", "int C=gi();", "C", "gi()", "gi", "int K=gi();", "K", "gi()", "gi", "if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }", "K<A", "K", "A", "{\n \tSystem.out.println(K);\n }", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }", "K<A+B", "K", "A+B", "A", "B", "{\n \tSystem.out.println(A);\n }", "System.out.println(A)", "System.out.println", "System.out", "System", "System.out", "A", "{\n \tSystem.out.print(A-(K-A-B));\n }", "System.out.print(A-(K-A-B))", "System.out.print", "System.out", "System", "System.out", "A-(K-A-B)", "A", "(K-A-B)", "K-A-B", "K", "A", "B", "String[] args", "args", "// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}", "gs", "{\n\t\treturn scanner.next();\n\t}", "return scanner.next();", "scanner.next()", "scanner.next", "scanner", "// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "gi", "{\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "return Integer.parseInt(scanner.next());", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}", "gl", "{\n\t\treturn Long.parseLong(scanner.next());\n\t}", "return Long.parseLong(scanner.next());", "Long.parseLong(scanner.next())", "Long.parseLong", "Long", "scanner.next()", "scanner.next", "scanner", "// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "gd", "{\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "return Double.parseDouble(scanner.next());", "Double.parseDouble(scanner.next())", "Double.parseDouble", "Double", "scanner.next()", "scanner.next", "scanner", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int A=gi();\n\t int B=gi();\n\t int C=gi();\n\t int K=gi();\n\n\n //System.out.print(c);\n if (K<A) {\n \tSystem.out.println(K);\n }else if(K<A+B){\n \tSystem.out.println(A);\n } else {\n \tSystem.out.print(A-(K-A-B));\n }\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static Scanner scanner; public static void main(String[] args) { scanner = new Scanner(System.in); int A=gi(); int B=gi(); int C=gi(); int K=gi(); //System.out.print(c); if (K<A) { System.out.println(K); }else if(K<A+B){ System.out.println(A); } else { System.out.print(A-(K-A-B)); } } // 文字列として入力を取得 public static String gs() { return scanner.next(); } // intとして入力を取得 public static int gi() { return Integer.parseInt(scanner.next()); } // longとして入力を取得 public static long gl() { return Long.parseLong(scanner.next()); } // doubleとして入力を取得 public static double gd() { return Double.parseDouble(scanner.next()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 13, 13, 14, 2, 2, 13, 13, 13, 30, 4, 18, 13, 13, 14, 2, 2, 2, 13, 13, 13, 13, 30, 4, 18, 13, 2, 13, 2, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 107, 14 ], [ 107, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 17, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 32, 33 ], [ 33, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 41, 42 ], [ 17, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 17, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 17, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 59, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 68, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 68, 79 ], [ 79, 80 ], [ 80, 81 ], [ 82, 82 ], [ 82, 83 ], [ 82, 84 ], [ 82, 85 ], [ 80, 86 ], [ 79, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 17, 98 ], [ 98, 99 ], [ 99, 100 ], [ 17, 101 ], [ 101, 102 ], [ 102, 103 ], [ 15, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }", "main", "{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }", "BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));", "br", "new BufferedReader(new java.io.InputStreamReader(System.in))", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "StringTokenizer st = new StringTokenizer(br.readLine());", "st", "new StringTokenizer(br.readLine())", "int A = Integer.parseInt(st.nextToken());", "A", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int B = Integer.parseInt(st.nextToken());", "B", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int C = Integer.parseInt(st.nextToken());", "C", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int K = Integer.parseInt(st.nextToken());", "K", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }", "A >= K", "A", "K", "{\n pw.println(K);\n }", "pw.println(K)", "pw.println", "pw", "K", "if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }", "A + B >= K", "A + B", "A", "B", "K", "{\n pw.println(A);\n }", "pw.println(A)", "pw.println", "pw", "A", "if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }", "A + B + C >= K", "A + B + C", "A + B + C", "A", "B", "C", "K", "{\n pw.println(A - (K-(A+B)));\n }", "pw.println(A - (K-(A+B)))", "pw.println", "pw", "A - (K-(A+B))", "A", "(K-(A+B))", "K", "(A+B)", "A", "B", "br.close()", "br.close", "br", "pw.close()", "pw.close", "pw", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }\n}", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int C = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n if(A >= K) {\n pw.println(K);\n } else if(A + B >= K) {\n pw.println(A);\n } else if(A + B + C >= K) {\n pw.println(A - (K-(A+B)));\n }\n \n br.close();\n pw.close();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(System.out); StringTokenizer st = new StringTokenizer(br.readLine()); int A = Integer.parseInt(st.nextToken()); int B = Integer.parseInt(st.nextToken()); int C = Integer.parseInt(st.nextToken()); int K = Integer.parseInt(st.nextToken()); if(A >= K) { pw.println(K); } else if(A + B >= K) { pw.println(A); } else if(A + B + C >= K) { pw.println(A - (K-(A+B))); } br.close(); pw.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 14, 2, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 2, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 55, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 55, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long a = sc.nextLong();", "a", "sc.nextLong()", "sc.nextLong", "sc", "long b = sc.nextLong();", "b", "sc.nextLong()", "sc.nextLong", "sc", "long c = sc.nextLong();", "c", "sc.nextLong()", "sc.nextLong", "sc", "long k = sc.nextLong();", "k", "sc.nextLong()", "sc.nextLong", "sc", "if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n }", "a > k", "a", "k", "{\n System.out.println(k);\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n }", "a == k", "a", "k", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n }", "if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }", "b >= (k - a)", "b", "(k - a)", "k", "a", "{\n System.out.println(a);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "{\n System.out.println(a - (k - (a + b)));\n }", "System.out.println(a - (k - (a + b)))", "System.out.println", "System.out", "System", "System.out", "a - (k - (a + b))", "a", "(k - (a + b))", "k", "(a + b)", "a", "b", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n \n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n \n if (a > k) {\n System.out.println(k);\n } else if (a == k) {\n System.out.println(a);\n } else {\n if (b >= (k - a)) {\n System.out.println(a);\n } else {\n System.out.println(a - (k - (a + b)));\n }\n } \n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); long k = sc.nextLong(); if (a > k) { System.out.println(k); } else if (a == k) { System.out.println(a); } else { if (b >= (k - a)) { System.out.println(a); } else { System.out.println(a - (k - (a + b))); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 39, 45 ], [ 45, 46 ], [ 45, 47 ], [ 35, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 8, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}", "main", "{\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "Long A = scanner.nextLong();", "A", "scanner.nextLong()", "scanner.nextLong", "scanner", "Long B = scanner.nextLong();", "B", "scanner.nextLong()", "scanner.nextLong", "scanner", "Long C = scanner.nextLong();", "C", "scanner.nextLong()", "scanner.nextLong", "scanner", "Long K = scanner.nextLong();", "K", "scanner.nextLong()", "scanner.nextLong", "scanner", "Long count = 0L;", "count", "0L", "if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }", "K >= A", "K", "A", "{\n K = K - A;\n count += A;\n }", "K = K - A", "K", "K - A", "K", "A", "count += A", "count", "A", "{\n count += K;\n K = 0L;\n }", "count += K", "count", "K", "K = 0L", "K", "0L", "K = K - B", "K", "K - B", "K", "B", "if(K > 0){\n count = count - K;\n }", "K > 0", "K", "0", "{\n count = count - K;\n }", "count = count - K", "count", "count - K", "count", "K", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}\n}", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n Long A = scanner.nextLong();\n Long B = scanner.nextLong();\n Long C = scanner.nextLong();\n Long K = scanner.nextLong();\n Long count = 0L;\n if(K >= A){\n K = K - A;\n count += A;\n }else{\n count += K;\n K = 0L;\n }\n K = K - B;\n if(K > 0){\n count = count - K;\n }\n\n System.out.println(count);\n \n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); Long A = scanner.nextLong(); Long B = scanner.nextLong(); Long C = scanner.nextLong(); Long K = scanner.nextLong(); Long count = 0L; if(K >= A){ K = K - A; count += A; }else{ count += K; K = 0L; } K = K - B; if(K > 0){ count = count - K; } System.out.println(count); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 17, 41, 13, 39, 39, 17, 17, 39, 17, 40, 17, 39, 17, 17, 39, 40, 17, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 8, 2, 2, 2, 13, 13, 13, 17, 2, 2, 13, 13, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 29, 17, 41, 13, 2, 13, 13, 14, 2, 13, 2, 13, 13, 30, 29, 17, 29, 17, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 42, 2, 13, 13, 30, 4, 13, 13, 13, 13, 40, 13, 40, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 18, 13, 13, 17, 30, 29, 17, 41, 13, 2, 18, 13, 13, 17, 42, 2, 13, 17, 30, 14, 2, 18, 13, 13, 18, 13, 2, 13, 17, 30, 3, 40, 13, 14, 2, 13, 17, 30, 29, 17, 41, 13, 2, 18, 13, 13, 17, 11, 1, 41, 13, 2, 18, 13, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 13, 13, 3, 4, 13, 13, 13, 13, 4, 13, 13, 2, 13, 17, 2, 18, 13, 13, 17, 29, 17, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 29, 13, 23, 13, 12, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 2, 13, 17, 4, 13, 17, 23, 13, 12, 13, 30, 29, 2, 4, 18, 13, 13, 4, 18, 13, 17, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 29, 4, 13, 13, 13, 14, 2, 2, 13, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 484, 14 ], [ 484, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 17, 20 ], [ 17, 21 ], [ 484, 22 ], [ 22, 23 ], [ 22, 24 ], [ 484, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 27, 35 ], [ 35, 36 ], [ 35, 37 ], [ 27, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 484, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 44, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 44, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 44, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 44, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 70, 74 ], [ 44, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 78, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 77, 90 ], [ 44, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 42, 97 ], [ 97, 98 ], [ 484, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 101, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 101, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 118, 124 ], [ 124, 125 ], [ 125, 126 ], [ 101, 127 ], [ 127, 128 ], [ 99, 129 ], [ 129, 130 ], [ 99, 131 ], [ 131, 132 ], [ 484, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 138, 140 ], [ 135, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 145, 146 ], [ 145, 147 ], [ 135, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 133, 153 ], [ 153, 154 ], [ 133, 155 ], [ 155, 156 ], [ 133, 157 ], [ 157, 158 ], [ 484, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 162, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 167, 170 ], [ 167, 171 ], [ 166, 172 ], [ 172, 173 ], [ 166, 174 ], [ 174, 175 ], [ 159, 176 ], [ 176, 177 ], [ 159, 178 ], [ 178, 179 ], [ 159, 180 ], [ 180, 181 ], [ 484, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 185, 191 ], [ 191, 192 ], [ 192, 193 ], [ 184, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 196, 200 ], [ 184, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 201, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 207, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 213, 215 ], [ 206, 216 ], [ 216, 217 ], [ 205, 218 ], [ 218, 219 ], [ 184, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 220, 224 ], [ 224, 225 ], [ 225, 226 ], [ 184, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 233 ], [ 184, 234 ], [ 234, 235 ], [ 235, 236 ], [ 236, 237 ], [ 236, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 234, 243 ], [ 243, 244 ], [ 243, 245 ], [ 234, 246 ], [ 246, 247 ], [ 247, 248 ], [ 234, 249 ], [ 250, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 253, 255 ], [ 252, 256 ], [ 256, 257 ], [ 256, 258 ], [ 251, 259 ], [ 259, 260 ], [ 260, 261 ], [ 260, 262 ], [ 259, 263 ], [ 184, 264 ], [ 264, 265 ], [ 264, 266 ], [ 264, 267 ], [ 264, 268 ], [ 184, 269 ], [ 269, 270 ], [ 269, 271 ], [ 269, 272 ], [ 272, 273 ], [ 272, 274 ], [ 269, 275 ], [ 275, 276 ], [ 276, 277 ], [ 276, 278 ], [ 275, 279 ], [ 184, 280 ], [ 280, 281 ], [ 182, 282 ], [ 282, 283 ], [ 484, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 287, 288 ], [ 287, 289 ], [ 286, 291 ], [ 291, 292 ], [ 292, 293 ], [ 293, 294 ], [ 293, 295 ], [ 291, 296 ], [ 296, 297 ], [ 296, 298 ], [ 291, 299 ], [ 299, 300 ], [ 300, 301 ], [ 291, 302 ], [ 303, 303 ], [ 303, 304 ], [ 304, 305 ], [ 305, 306 ], [ 305, 307 ], [ 304, 308 ], [ 308, 309 ], [ 308, 310 ], [ 286, 311 ], [ 311, 312 ], [ 284, 313 ], [ 313, 314 ], [ 484, 315 ], [ 315, 316 ], [ 315, 317 ], [ 317, 318 ], [ 318, 319 ], [ 319, 320 ], [ 320, 321 ], [ 320, 322 ], [ 318, 323 ], [ 315, 324 ], [ 324, 325 ], [ 484, 326 ], [ 326, 327 ], [ 326, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 329, 332 ], [ 333, 333 ], [ 333, 334 ], [ 334, 335 ], [ 335, 336 ], [ 336, 337 ], [ 336, 338 ], [ 334, 339 ], [ 339, 340 ], [ 339, 341 ], [ 328, 342 ], [ 342, 343 ], [ 342, 344 ], [ 326, 345 ], [ 345, 346 ], [ 484, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 353, 354 ], [ 352, 355 ], [ 351, 356 ], [ 356, 357 ], [ 357, 358 ], [ 356, 359 ], [ 347, 360 ], [ 360, 361 ], [ 484, 362 ], [ 362, 363 ], [ 362, 364 ], [ 364, 365 ], [ 365, 366 ], [ 366, 367 ], [ 366, 368 ], [ 365, 369 ], [ 369, 370 ], [ 370, 371 ], [ 371, 372 ], [ 371, 373 ], [ 371, 374 ], [ 364, 375 ], [ 375, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 376, 380 ], [ 375, 381 ], [ 381, 382 ], [ 382, 383 ], [ 364, 384 ], [ 384, 385 ], [ 385, 386 ], [ 385, 387 ], [ 385, 388 ], [ 388, 389 ], [ 388, 390 ], [ 362, 391 ], [ 391, 392 ], [ 362, 393 ], [ 393, 394 ], [ 484, 395 ], [ 395, 396 ], [ 395, 397 ], [ 397, 398 ], [ 395, 399 ], [ 399, 400 ], [ 395, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 404, 405 ], [ 404, 406 ], [ 395, 407 ], [ 407, 408 ], [ 407, 409 ], [ 409, 410 ], [ 410, 411 ], [ 411, 412 ], [ 412, 413 ], [ 412, 414 ], [ 411, 415 ], [ 415, 416 ], [ 416, 417 ], [ 417, 418 ], [ 410, 419 ], [ 419, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 423, 424 ], [ 424, 425 ], [ 425, 426 ], [ 420, 427 ], [ 427, 428 ], [ 428, 429 ], [ 428, 430 ], [ 409, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 395, 435 ], [ 435, 436 ], [ 435, 437 ], [ 437, 438 ], [ 438, 439 ], [ 439, 440 ], [ 440, 441 ], [ 439, 442 ], [ 442, 443 ], [ 395, 444 ], [ 444, 445 ], [ 444, 446 ], [ 446, 447 ], [ 447, 448 ], [ 448, 449 ], [ 449, 450 ], [ 448, 451 ], [ 451, 452 ], [ 395, 453 ], [ 453, 454 ], [ 453, 455 ], [ 455, 456 ], [ 456, 457 ], [ 457, 458 ], [ 458, 459 ], [ 457, 460 ], [ 460, 461 ], [ 395, 462 ], [ 462, 463 ], [ 462, 464 ], [ 464, 465 ], [ 465, 466 ], [ 465, 467 ], [ 464, 468 ], [ 468, 469 ], [ 469, 470 ], [ 469, 471 ], [ 471, 472 ], [ 472, 473 ], [ 473, 474 ], [ 468, 475 ], [ 475, 476 ], [ 476, 477 ], [ 476, 478 ], [ 478, 479 ], [ 479, 480 ], [ 464, 481 ], [ 481, 482 ], [ 0, 483 ], [ 483, 484 ], [ 483, 485 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.*;", "util.*", "java", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "Main", "private static final int MOD = (int) Math.pow(10, 9);", "MOD", "(int) Math.pow(10, 9)", "Math.pow", "Math", "10", "9", "private static final long EIGHT = (long) 1e18;", "EIGHT", "(long) 1e18", "private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};", "DIRS", "{{0, 1}, {0, -1}, {1, 0}, {-1, 0}}", "{0, 1}", "0", "1", "{0, -1}", "0", "-1", "1", "{1, 0}", "1", "0", "{-1, 0}", "-1", "1", "0", "public static void main(String[] args) {\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }", "main", "{\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }", "FastReader sc = new FastReader();", "sc", "new FastReader()", "final long A = sc.nextLong();", "A", "sc.nextLong()", "sc.nextLong", "sc", "final long B = sc.nextLong();", "B", "sc.nextLong()", "sc.nextLong", "sc", "final long C = sc.nextLong();", "C", "sc.nextLong()", "sc.nextLong", "sc", "final long K = sc.nextLong();", "K", "sc.nextLong()", "sc.nextLong", "sc", "long ans = Math.min(A, K);", "ans", "Math.min(A, K)", "Math.min", "Math", "A", "K", "ans -= (K-A-B)>0?(K-A-B): 0", "ans", "(K-A-B)>0?(K-A-B): 0", "(K-A-B)>0", "(K-A-B)", "K-A-B", "K", "A", "B", "0", "(K-A-B)", "K-A-B", "K", "A", "B", "0", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "/*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }", "isOverflowByMul", "{\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }", "if (a == 0 || b == 0) {\n return false;\n }", "a == 0 || b == 0", "a == 0", "a", "0", "b == 0", "b", "0", "{\n return false;\n }", "return false;", "false", "long result = a * b;", "result", "a * b", "a", "b", "if (a == result / b) {\n return false;\n }", "a == result / b", "a", "result / b", "result", "b", "{\n return false;\n }", "return false;", "false", "return true;", "true", "long a", "a", "long b", "b", "static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }", "swap", "{\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }", "int tmp = nums[x];", "tmp", "nums[x]", "nums", "x", "nums[x] = nums[y]", "nums[x]", "nums", "x", "nums[y]", "nums", "y", "nums[y] = tmp", "nums[y]", "nums", "y", "tmp", "int[] nums", "nums", "int x", "x", "int y", "y", "static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }", "reverse", "{\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }", "while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }", "left < right", "left", "right", "{\n swap(nums, left, right);\n left++;\n right--;\n }", "swap(nums, left, right)", "swap", "nums", "left", "right", "left++", "left", "right--", "right", "int[] nums", "nums", "int left", "left", "int right", "right", "static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }", "findNextPermutation", "{\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }", "if (nums.length <= 1) {\n return false;\n }", "nums.length <= 1", "nums.length", "nums", "nums.length", "1", "{\n return false;\n }", "return false;", "false", "int last = nums.length - 2;", "last", "nums.length - 2", "nums.length", "nums", "nums.length", "2", "while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }", "last >= 0", "last", "0", "{\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }", "if (nums[last] < nums[last + 1]){\n break;\n }", "nums[last] < nums[last + 1]", "nums[last]", "nums", "last", "nums[last + 1]", "nums", "last + 1", "last", "1", "{\n break;\n }", "break;", "last--", "last", "if (last < 0) { return false; }", "last < 0", "last", "0", "{ return false; }", "return false;", "false", "int nextGenerater = nums.length - 1;", "nextGenerater", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "int i = nums.length - 1;", "int i = nums.length - 1;", "i", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "i > last", "i", "last", "i--", "i--", "i", "{\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "{\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }", "nums[i] > nums[last]", "nums[i]", "nums", "i", "nums[last]", "nums", "last", "{\n nextGenerater = i;\n break;\n }", "nextGenerater = i", "nextGenerater", "i", "break;", "swap(nums, nextGenerater, last)", "swap", "nums", "nextGenerater", "last", "reverse(nums, last + 1, nums.length - 1)", "reverse", "nums", "last + 1", "last", "1", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "return true;", "true", "int[] nums", "nums", "static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }", "generateNArray", "{\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = i + 1;\n }", "{\n res[i] = i + 1;\n }", "res[i] = i + 1", "res[i]", "res", "i", "i + 1", "i", "1", "return res;", "res", "int n", "n", "static private void print(String s) {\n System.out.println(s);\n }", "print", "{\n System.out.println(s);\n }", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "String s", "s", "static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }", "printArray", "{\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }", "for (int s: e) {\n System.out.print(s + \" \");\n }", "int s", "e", "{\n System.out.print(s + \" \");\n }", "{\n System.out.print(s + \" \");\n }", "System.out.print(s + \" \")", "System.out.print", "System.out", "System", "System.out", "s + \" \"", "s", "\" \"", "print(\"\")", "print", "\"\"", "int[] e", "e", "static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }", "log2", "{\n return (int)(Math.log(x) / Math.log(2));\n }", "return (int)(Math.log(x) / Math.log(2));", "(int)(Math.log(x) / Math.log(2))", "Math.log(x)", "Math.log", "Math", "x", "Math.log(2)", "Math.log", "Math", "2", "int x", "x", "static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }", "gcd", "{\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }", "if (m < n) { return gcd(n, m); }", "m < n", "m", "n", "{ return gcd(n, m); }", "return gcd(n, m);", "gcd(n, m)", "gcd", "n", "m", "if (m % n == 0) { return n; }", "m % n == 0", "m % n", "m", "n", "0", "{ return n; }", "return n;", "n", "return gcd(n, m%n);", "gcd(n, m%n)", "gcd", "n", "m%n", "m", "n", "long m", "m", "long n", "n", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n final long A = sc.nextLong();\n final long B = sc.nextLong();\n final long C = sc.nextLong();\n final long K = sc.nextLong();\n long ans = Math.min(A, K);\n ans -= (K-A-B)>0?(K-A-B): 0;\n System.out.println(ans);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { private static final int MOD = (int) Math.pow(10, 9); private static final long EIGHT = (long) 1e18; private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; public static void main(String[] args) { FastReader sc = new FastReader(); final long A = sc.nextLong(); final long B = sc.nextLong(); final long C = sc.nextLong(); final long K = sc.nextLong(); long ans = Math.min(A, K); ans -= (K-A-B)>0?(K-A-B): 0; System.out.println(ans); } /* * Check if a * b is overflow or not */ static Boolean isOverflowByMul(long a, long b) { if (a == 0 || b == 0) { return false; } long result = a * b; if (a == result / b) { return false; } return true; } static private void swap(int[] nums, int x, int y) { int tmp = nums[x]; nums[x] = nums[y]; nums[y] = tmp; } static private void reverse(int[] nums, int left, int right) { while (left < right) { swap(nums, left, right); left++; right--; } } static private boolean findNextPermutation(int[] nums) { if (nums.length <= 1) { return false; } int last = nums.length - 2; while (last >= 0) { if (nums[last] < nums[last + 1]){ break; } last--; } if (last < 0) { return false; } int nextGenerater = nums.length - 1; for (int i = nums.length - 1; i > last; i--) { if (nums[i] > nums[last]) { nextGenerater = i; break; } } swap(nums, nextGenerater, last); reverse(nums, last + 1, nums.length - 1); return true; } static private int[] generateNArray(int n) { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = i + 1; } return res; } static private void print(String s) { System.out.println(s); } static private void printArray(int[] e) { for (int s: e) { System.out.print(s + " "); } print(""); } static private int log2(int x) { return (int)(Math.log(x) / Math.log(2)); } static private long gcd(long m, long n) { if (m < n) { return gcd(n, m); } if (m % n == 0) { return n; } return gcd(n, m%n); } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 8, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 40, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 51, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 51, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n}\n \n \n ", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A", "A", "B", "B", "C", "C", "K;", "K", "A=sc.nextInt()", "A", "sc.nextInt()", "sc.nextInt", "sc", "B=sc.nextInt()", "B", "sc.nextInt()", "sc.nextInt", "sc", "C=sc.nextInt()", "C", "sc.nextInt()", "sc.nextInt", "sc", "K=sc.nextInt()", "K", "sc.nextInt()", "sc.nextInt", "sc", "int sum=A;", "sum", "A", "if(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}", "A>=K", "A", "K", "{\n\t\t\tsum = K;\n\t\t}", "sum = K", "sum", "K", "if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}", "A+B>=K", "A+B", "A", "B", "K", "{\n\t\t\tsum=A;\n\t\t}", "sum=A", "sum", "A", "{\n\t\t\tsum=A-(K-A-B);\n\t\t}", "sum=A-(K-A-B)", "sum", "A-(K-A-B)", "A", "(K-A-B)", "K-A-B", "K", "A", "B", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n\t\tint A,B,C,K;\n\t\tA=sc.nextInt();\n\t\tB=sc.nextInt();\n\t\tC=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tint sum=A;\n\t\tif(A>=K) {\n\t\t\tsum = K;\n\t\t}\n\t\telse if(A+B>=K) {\n\t\t\tsum=A;\n\t\t}else {\n\t\t\tsum=A-(K-A-B);\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A,B,C,K; A=sc.nextInt(); B=sc.nextInt(); C=sc.nextInt(); K=sc.nextInt(); int sum=A; if(A>=K) { sum = K; } else if(A+B>=K) { sum=A; }else { sum=A-(K-A-B); } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 49, 51 ], [ 46, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ], [ 0, 74 ], [ 74, 75 ], [ 74, 76 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "long K = sc.nextLong();", "K", "sc.nextLong()", "sc.nextLong", "sc", "sc.close()", "sc.close", "sc", "long answer = 0L;", "answer", "0L", "if(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}", "K <= A", "K", "A", "{\n\t\t\tanswer = K;\n\t\t}", "answer = K", "answer", "K", "if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}", "K <= (A + B)", "K", "(A + B)", "A", "B", "{\n\t\t\tanswer = A;\n\t\t}", "answer = A", "answer", "A", "{\n\t\t\tanswer = A - (K - A - B); \n\t\t}", "answer = A - (K - A - B)", "answer", "A - (K - A - B)", "A", "(K - A - B)", "K - A - B", "K", "A", "B", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt(); // 1\n\t\tint B = sc.nextInt(); // 0\n\t\tint C = sc.nextInt(); // -1\n\t\tlong K = sc.nextLong(); // 取るカードの枚数\n\t\tsc.close();\n\t\tlong answer = 0L;\n\t\tif(K <= A) {\n\t\t\tanswer = K;\n\t\t} else if(K <= (A + B)) {\n\t\t\tanswer = A;\n\t\t} else {\n\t\t\tanswer = A - (K - A - B); \n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); // 1 int B = sc.nextInt(); // 0 int C = sc.nextInt(); // -1 long K = sc.nextLong(); // 取るカードの枚数 sc.close(); long answer = 0L; if(K <= A) { answer = K; } else if(K <= (A + B)) { answer = A; } else { answer = A - (K - A - B); } System.out.println(answer); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 39, 17, 17, 40, 17, 41, 13, 20, 17, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 2, 18, 13, 13, 18, 13, 13, 0, 13, 18, 13, 13, 30, 0, 13, 2, 18, 13, 13, 13, 0, 13, 17, 4, 18, 18, 13, 13, 13, 4, 18, 13, 29, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 117, 5 ], [ 117, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 14, 16 ], [ 14, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 8, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 27, 37 ], [ 37, 38 ], [ 38, 39 ], [ 27, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 8, 54 ], [ 54, 55 ], [ 54, 56 ], [ 8, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 57, 67 ], [ 67, 68 ], [ 68, 69 ], [ 57, 70 ], [ 71, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 72, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 78, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 72, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 93, 101 ], [ 101, 102 ], [ 101, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 8, 110 ], [ 110, 111 ], [ 111, 112 ], [ 8, 113 ], [ 6, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }\n}", "Main", "public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int cards[] = {1, 0, -1};", "cards", "{1, 0, -1}", "1", "0", "-1", "1", "int counts[] = new int[3]", "counts", "new int[3]", "3", "n", "n", "maxValue;", "maxValue", "for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < counts.length", "i", "counts.length", "counts", "counts.length", "i++", "i++", "i", "{\n counts[i] = scan.nextInt();\n }", "{\n counts[i] = scan.nextInt();\n }", "counts[i] = scan.nextInt()", "counts[i]", "counts", "i", "scan.nextInt()", "scan.nextInt", "scan", "n = scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "maxValue = 0", "maxValue", "0", "for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < counts.length", "i", "counts.length", "counts", "counts.length", "i++", "i++", "i", "{\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }", "{\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }", "if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }", "n >= counts[i]", "n", "counts[i]", "counts", "i", "{\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n }", "maxValue += cards[i] * counts[i]", "maxValue", "cards[i] * counts[i]", "cards[i]", "cards", "i", "counts[i]", "counts", "i", "n -= counts[i]", "n", "counts[i]", "counts", "i", "{\n maxValue += cards[i] * n;\n n = 0;\n }", "maxValue += cards[i] * n", "maxValue", "cards[i] * n", "cards[i]", "cards", "i", "n", "n = 0", "n", "0", "System.out.println(maxValue)", "System.out.println", "System.out", "System", "System.out", "maxValue", "scan.close()", "scan.close", "scan", "return;", "String args[]", "args", "public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }\n}", "public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int cards[] = {1, 0, -1};\n int counts[] = new int[3], n, maxValue;\n\n for(int i = 0; i < counts.length; i++) {\n counts[i] = scan.nextInt();\n }\n n = scan.nextInt();\n\n maxValue = 0;\n for(int i = 0; i < counts.length; i++) {\n if(n >= counts[i]) {\n maxValue += cards[i] * counts[i];\n n -= counts[i];\n } else {\n maxValue += cards[i] * n;\n n = 0;\n }\n }\n\n System.out.println(maxValue);\n scan.close();\n return;\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int cards[] = {1, 0, -1}; int counts[] = new int[3], n, maxValue; for(int i = 0; i < counts.length; i++) { counts[i] = scan.nextInt(); } n = scan.nextInt(); maxValue = 0; for(int i = 0; i < counts.length; i++) { if(n >= counts[i]) { maxValue += cards[i] * counts[i]; n -= counts[i]; } else { maxValue += cards[i] * n; n = 0; } } System.out.println(maxValue); scan.close(); return; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 17, 14, 2, 2, 13, 13, 13, 30, 0, 13, 17, 14, 2, 2, 2, 13, 13, 13, 13, 30, 0, 13, 17, 30, 0, 13, 17, 35, 13, 34, 17, 1, 0, 13, 13, 3, 34, 17, 1, 0, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 46, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 59, 59 ], [ 59, 60 ], [ 59, 61 ], [ 59, 62 ], [ 57, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 56, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 8, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 72, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 72, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 8, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 6, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "String flag = null;", "flag", "null", "if(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}", "A >= K", "A", "K", "{ //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}", "flag = \"A\"", "flag", "\"A\"", "if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}", "A + B >= K", "A + B", "A", "B", "K", "{ //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}", "flag = \"B\"", "flag", "\"B\"", "if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}", "A + B + C >= K", "A + B + C", "A + B + C", "A", "B", "C", "K", "{ //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}", "flag = \"C\"", "flag", "\"C\"", "{ //K = 0\n\t\t\tsum = 0;\n\t\t}", "sum = 0", "sum", "0", "switch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}", "flag", "case \"A\":", "\"A\"", "case \"A\":", "sum = K", "sum", "K", "break;", "case \"B\":", "\"B\"", "case \"B\":", "sum = A", "sum", "A", "break;", "case \"C\":", "\"C\"", "case \"C\":", "sum = A - (K - A - B)", "sum", "A - (K - A - B)", "A", "(K - A - B)", "K - A - B", "K", "A", "B", "System.out.print(sum)", "System.out.print", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt(); //1が書かれたカードの枚数\n\t\tint B = sc.nextInt(); //0が書かれたカードの枚数\n\t\tint C = sc.nextInt(); //-1が書かれたカードの枚数\n\t\tint K = sc.nextInt(); //選ぶカードの枚数\n\t\tint sum = 0; //選んだカードの合計\n\t\tString flag = null;\n\n\t\tif(A >= K) { //選ぶカードは全部1\n\t\t\tflag = \"A\";\n\t\t}else if(A + B >= K) { //選ぶカードは1と0\n\t\t\tflag = \"B\";\n\t\t}else if (A + B + C >= K) { //選ぶカードは1と0と-1\n\t\t\tflag = \"C\";\n\t\t}else { //K = 0\n\t\t\tsum = 0;\n\t\t}\n\n\t\tswitch(flag) {\n\t\tcase \"A\":\n\t\t\tsum = K;\n\t\t\tbreak;\n\t\tcase \"B\":\n\t\t\tsum = A;\n\t\t\tbreak;\n\t\tcase \"C\":\n\t\t\tsum = A - (K - A - B);\n\t\t}\n\n\t\tSystem.out.print(sum);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); //1が書かれたカードの枚数 int B = sc.nextInt(); //0が書かれたカードの枚数 int C = sc.nextInt(); //-1が書かれたカードの枚数 int K = sc.nextInt(); //選ぶカードの枚数 int sum = 0; //選んだカードの合計 String flag = null; if(A >= K) { //選ぶカードは全部1 flag = "A"; }else if(A + B >= K) { //選ぶカードは1と0 flag = "B"; }else if (A + B + C >= K) { //選ぶカードは1と0と-1 flag = "C"; }else { //K = 0 sum = 0; } switch(flag) { case "A": sum = K; break; case "B": sum = A; break; case "C": sum = A - (K - A - B); } System.out.print(sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 4, 18, 13, 13, 14, 2, 2, 2, 13, 13, 13, 17, 4, 18, 13, 13, 4, 18, 13, 2, 2, 40, 13, 2, 17, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 0, 18, 36, 13, 20, 23, 13, 12, 13, 30, 4, 18, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 30, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 37, 20, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 4, 18, 13, 13, 29, 4, 13, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 6, 13, 12, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ], [ 0, 31 ], [ 31, 32 ], [ 31, 33 ], [ 0, 34 ], [ 367, 35 ], [ 367, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 38, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 38, 49 ], [ 49, 50 ], [ 49, 51 ], [ 38, 52 ], [ 52, 53 ], [ 52, 54 ], [ 38, 55 ], [ 55, 56 ], [ 55, 57 ], [ 38, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 58, 62 ], [ 58, 63 ], [ 38, 64 ], [ 64, 65 ], [ 65, 66 ], [ 36, 67 ], [ 67, 68 ], [ 367, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 73, 78 ], [ 78, 79 ], [ 73, 80 ], [ 80, 81 ], [ 73, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 73, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 73, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 73, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 73, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 102, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 102, 112 ], [ 112, 113 ], [ 113, 114 ], [ 115, 115 ], [ 115, 116 ], [ 115, 117 ], [ 115, 118 ], [ 113, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 112, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 131, 133 ], [ 128, 134 ], [ 71, 135 ], [ 135, 136 ], [ 71, 137 ], [ 137, 138 ], [ 71, 139 ], [ 139, 140 ], [ 367, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 141, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 145, 151 ], [ 151, 152 ], [ 141, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 156, 160 ], [ 153, 161 ], [ 161, 162 ], [ 141, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 141, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 169, 176 ], [ 176, 177 ], [ 367, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 178, 182 ], [ 182, 183 ], [ 182, 184 ], [ 178, 186 ], [ 186, 187 ], [ 178, 188 ], [ 188, 189 ], [ 178, 190 ], [ 190, 191 ], [ 178, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 192, 200 ], [ 200, 201 ], [ 178, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 205, 210 ], [ 210, 211 ], [ 211, 212 ], [ 204, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 213, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 221, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 230, 231 ], [ 231, 232 ], [ 230, 233 ], [ 217, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 204, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 178, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 249, 254 ], [ 254, 255 ], [ 255, 256 ], [ 255, 257 ], [ 254, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 249, 263 ], [ 263, 264 ], [ 263, 265 ], [ 249, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 266, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 270, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 249, 279 ], [ 279, 280 ], [ 279, 281 ], [ 249, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 282, 287 ], [ 287, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 289, 293 ], [ 293, 294 ], [ 293, 295 ], [ 288, 296 ], [ 296, 297 ], [ 297, 298 ], [ 287, 299 ], [ 299, 300 ], [ 299, 301 ], [ 287, 302 ], [ 302, 303 ], [ 302, 304 ], [ 304, 305 ], [ 304, 306 ], [ 287, 307 ], [ 307, 308 ], [ 307, 309 ], [ 309, 310 ], [ 249, 311 ], [ 311, 312 ], [ 312, 313 ], [ 312, 314 ], [ 178, 315 ], [ 315, 316 ], [ 315, 317 ], [ 317, 318 ], [ 318, 319 ], [ 319, 320 ], [ 319, 321 ], [ 318, 322 ], [ 322, 323 ], [ 323, 324 ], [ 324, 325 ], [ 325, 326 ], [ 324, 327 ], [ 317, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 315, 332 ], [ 332, 333 ], [ 178, 334 ], [ 334, 335 ], [ 334, 336 ], [ 336, 337 ], [ 337, 338 ], [ 341, 339 ], [ 351, 340 ], [ 348, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 341, 345 ], [ 345, 346 ], [ 345, 347 ], [ 348, 348 ], [ 348, 349 ], [ 348, 350 ], [ 351, 351 ], [ 351, 352 ], [ 351, 353 ], [ 341, 354 ], [ 354, 355 ], [ 354, 356 ], [ 356, 357 ], [ 334, 358 ], [ 358, 359 ], [ 178, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 362, 364 ], [ 364, 365 ], [ 0, 366 ], [ 366, 367 ], [ 366, 368 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author roger\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(int i) {\n writer.println(i);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.BufferedWriter;", "BufferedWriter", "java.io", "import java.io.Writer;", "Writer", "java.io", "import java.io.OutputStreamWriter;", "OutputStreamWriter", "java.io", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(int i) {\n writer.println(i);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "InputReader in = new InputReader(inputStream);", "in", "new InputReader(inputStream)", "OutputWriter out = new OutputWriter(outputStream);", "out", "new OutputWriter(outputStream)", "BEasyLinearProgramming solver = new BEasyLinearProgramming();", "solver", "new BEasyLinearProgramming()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }\n\n }", "BEasyLinearProgramming", "public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }", "solve", "{\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }", "int a", "a", "b", "b", "c", "c", "k;", "k", "a = in.nextInt()", "a", "in.nextInt()", "in.nextInt", "in", "b = in.nextInt()", "b", "in.nextInt()", "in.nextInt", "in", "c = in.nextInt()", "c", "in.nextInt()", "in.nextInt", "in", "k = in.nextInt()", "k", "in.nextInt()", "in.nextInt", "in", "if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);", "k - a <= 0", "k - a", "k", "a", "0", "out.println(k)", "out.println", "out", "k", "if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);", "k - a - b <= 0", "k - a - b", "k - a - b", "k", "a", "b", "0", "out.println(a)", "out.println", "out", "a", "out.println(-k + 2 * a + b)", "out.println", "out", "-k + 2 * a + b", "-k + 2 * a + b", "-k", "k", "2 * a", "2", "a", "b", "int testNumber", "testNumber", "InputReader in", "in", "OutputWriter out", "out", "static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(int i) {\n writer.println(i);\n }\n\n }", "OutputWriter", "private final PrintWriter writer;", "writer", "public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }", "OutputWriter", "{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }", "writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))", "writer", "new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))", "OutputStream outputStream", "outputStream", "public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }", "OutputWriter", "{\n this.writer = new PrintWriter(writer);\n }", "this.writer = new PrintWriter(writer)", "this.writer", "this", "this.writer", "new PrintWriter(writer)", "Writer writer", "writer", "public void close() {\n writer.close();\n }", "close", "{\n writer.close();\n }", "writer.close()", "writer.close", "writer", "public void println(int i) {\n writer.println(i);\n }", "println", "{\n writer.println(i);\n }", "writer.println(i)", "writer.println", "writer", "i", "int i", "i", "static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }", "InputReader", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "private InputReader.SpaceCharFilter filter;", "filter", "public InputReader(InputStream stream) {\n this.stream = stream;\n }", "InputReader", "{\n this.stream = stream;\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "read", "{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "if (numChars == -1) {\n throw new InputMismatchException();\n }", "numChars == -1", "numChars", "-1", "1", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar >= numChars", "curChar", "numChars", "{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar = 0", "curChar", "0", "try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }", "catch (IOException e) {\n throw new InputMismatchException();\n }", "IOException e", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "{\n numChars = stream.read(buf);\n }", "numChars = stream.read(buf)", "numChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (numChars <= 0) {\n return -1;\n }", "numChars <= 0", "numChars", "0", "{\n return -1;\n }", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "nextInt", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "int res = 0;", "res", "0", "do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }", "if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }", "c < '0' || c > '9'", "c < '0'", "c", "'0'", "c > '9'", "c", "'9'", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "isSpaceChar", "{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "if (filter != null) {\n return filter.isSpaceChar(c);\n }", "filter != null", "filter", "null", "{\n return filter.isSpaceChar(c);\n }", "return filter.isSpaceChar(c);", "filter.isSpaceChar(c)", "filter.isSpaceChar", "filter", "c", "return isWhitespace(c);", "isWhitespace(c)", "isWhitespace", "c", "int c", "c", "public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isWhitespace", "{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }", "SpaceCharFilter", "public boolean isSpaceChar(int ch);", "isSpaceChar", "int ch", "ch", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(int i) {\n writer.println(i);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BEasyLinearProgramming solver = new BEasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BEasyLinearProgramming {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int a, b, c, k;\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n k = in.nextInt();\n if (k - a <= 0) out.println(k);\n else if (k - a - b <= 0) out.println(a);\n else out.println(-k + 2 * a + b);\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(int i) {\n writer.println(i);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.BufferedWriter; import java.io.Writer; import java.io.OutputStreamWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author roger */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); OutputWriter out = new OutputWriter(outputStream); BEasyLinearProgramming solver = new BEasyLinearProgramming(); solver.solve(1, in, out); out.close(); } static class BEasyLinearProgramming { public void solve(int testNumber, InputReader in, OutputWriter out) { int a, b, c, k; a = in.nextInt(); b = in.nextInt(); c = in.nextInt(); k = in.nextInt(); if (k - a <= 0) out.println(k); else if (k - a - b <= 0) out.println(a); else out.println(-k + 2 * a + b); } } static class OutputWriter { private final PrintWriter writer; public OutputWriter(OutputStream outputStream) { writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream))); } public OutputWriter(Writer writer) { this.writer = new PrintWriter(writer); } public void close() { writer.close(); } public void println(int i) { writer.println(i); } } static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private InputReader.SpaceCharFilter filter; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) { throw new InputMismatchException(); } if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) { return -1; } } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') { throw new InputMismatchException(); } res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public boolean isSpaceChar(int c) { if (filter != null) { return filter.isSpaceChar(c); } return isWhitespace(c); } public static boolean isWhitespace(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 13, 0, 13, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 0, 13, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 37, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 50, 54 ], [ 8, 55 ], [ 55, 56 ], [ 55, 57 ], [ 8, 58 ], [ 58, 59 ], [ 58, 60 ], [ 8, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 63, 67 ], [ 8, 68 ], [ 68, 69 ], [ 68, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }", "main", "{\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }", "Scanner o = new Scanner(System.in);", "o", "new Scanner(System.in)", "int a = o.nextInt();", "a", "o.nextInt()", "o.nextInt", "o", "int b = o.nextInt();", "b", "o.nextInt()", "o.nextInt", "o", "int c = o.nextInt();", "c", "o.nextInt()", "o.nextInt", "o", "int k = o.nextInt();", "k", "o.nextInt()", "o.nextInt", "o", "int ans = 0;", "ans", "0", "ans += Math.min(k,a)", "ans", "Math.min(k,a)", "Math.min", "Math", "k", "a", "k -= ans", "k", "ans", "a -= ans", "a", "ans", "int x = Math.min(k,b);", "x", "Math.min(k,b)", "Math.min", "Math", "k", "b", "k -= x", "k", "x", "b -= x", "b", "x", "int y = Math.min(k,c);", "y", "Math.min(k,c)", "Math.min", "Math", "k", "c", "ans -= y", "ans", "y", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner o = new Scanner(System.in);\n int a = o.nextInt();\n int b = o.nextInt();\n int c = o.nextInt();\n int k = o.nextInt();\n\n int ans = 0;\n ans += Math.min(k,a);\n k -= ans;\n a -= ans;\n int x = Math.min(k,b);\n k -= x;\n b -= x;\n int y = Math.min(k,c);\n ans -= y;\n\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner o = new Scanner(System.in); int a = o.nextInt(); int b = o.nextInt(); int c = o.nextInt(); int k = o.nextInt(); int ans = 0; ans += Math.min(k,a); k -= ans; a -= ans; int x = Math.min(k,b); k -= x; b -= x; int y = Math.min(k,c); ans -= y; System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 41, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 2, 2, 13, 40, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 8, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 49, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 61, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 61, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 77, 82 ], [ 74, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 6, 89 ], [ 89, 90 ], [ 0, 91 ], [ 91, 92 ], [ 91, 93 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}", "main", "{\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}", "Scanner scr =new Scanner(System.in);", "scr", "new Scanner(System.in)", "int A = scr.nextInt();", "A", "scr.nextInt()", "scr.nextInt", "scr", "int B = scr.nextInt();", "B", "scr.nextInt()", "scr.nextInt", "scr", "int c = scr.nextInt();", "c", "scr.nextInt()", "scr.nextInt", "scr", "int K = scr.nextInt();", "K", "scr.nextInt()", "scr.nextInt", "scr", "int X = K-A;", "X", "K-A", "K", "A", "int Y = K-X;", "Y", "K-X", "K", "X", "int Z = X-B;", "Z", "X-B", "X", "B", "int max;", "max", "if(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}", "X < 0", "X", "0", "{\n\t\t\tSystem.out.println(K);\n\t\t}", "System.out.println(K)", "System.out.println", "System.out", "System", "System.out", "K", "{\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}", "if(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}", "X-B < 0", "X-B", "X", "B", "0", "{\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}", "System.out.println(Y)", "System.out.println", "System.out", "System", "System.out", "Y", "{\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}", "max = (Z*-1)+(Y)", "max", "(Z*-1)+(Y)", "(Z*-1)", "Z", "-1", "1", "(Y)", "System.out.println(max)", "System.out.println", "System.out", "System", "System.out", "max", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint c = scr.nextInt();\n\t\tint K = scr.nextInt();\n\t\t\n\t\tint X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇��\n\t\tint Y = K-X;//A�̖���\n\t\t\n\t\tint Z = X-B;//\n\t\t\n\t\tint max;\n\t\n\t\tif(X < 0) {\n\t\t\tSystem.out.println(K);\n\t\t}else {\n\t\t\tif(X-B < 0) {\n\t\t\t\tSystem.out.println(Y);\n\t\t\t}else {\n\t\t\t\tmax = (Z*-1)+(Y);\n\t\t\t\tSystem.out.println(max);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scr =new Scanner(System.in); int A = scr.nextInt(); int B = scr.nextInt(); int c = scr.nextInt(); int K = scr.nextInt(); int X = K-A;//A���Ƃ��āC���ƂƂ�K�v�̂��閇�� int Y = K-X;//A�̖��� int Z = X-B;// int max; if(X < 0) { System.out.println(K); }else { if(X-B < 0) { System.out.println(Y); }else { max = (Z*-1)+(Y); System.out.println(max); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 13, 0, 13, 2, 2, 13, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 30, 14, 2, 13, 17, 30, 0, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 50, 50 ], [ 50, 51 ], [ 50, 52 ], [ 50, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 6, 78 ], [ 78, 79 ], [ 0, 80 ], [ 80, 81 ], [ 80, 82 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}\n}\n\n ", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int total = 0;", "total", "0", "if(a<=k){\n total += a;\n }else{\n total += k;\n }", "a<=k", "a", "k", "{\n total += a;\n }", "total += a", "total", "a", "{\n total += k;\n }", "total += k", "total", "k", "k = k-a-b", "k", "k-a-b", "k-a-b", "k", "a", "b", "if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }", "c<=k", "c", "k", "{\n total -=c;\n }", "total -=c", "total", "c", "{\n if(k>0){\n total -= k;\n }else{\n }\n }", "if(k>0){\n total -= k;\n }else{\n }", "k>0", "k", "0", "{\n total -= k;\n }", "total -= k", "total", "k", "{\n }", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n int total = 0;\n if(a<=k){\n total += a;\n }else{\n total += k;\n }\n k = k-a-b;\n if(c<=k){\n total -=c;\n }else{\n if(k>0){\n total -= k;\n }else{\n }\n }\n System.out.println(total);\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int k = sc.nextInt(); int total = 0; if(a<=k){ total += a; }else{ total += k; } k = k-a-b; if(c<=k){ total -=c; }else{ if(k>0){ total -= k; }else{ } } System.out.println(total); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 40, 13, 40, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 40, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 40, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 50, 57 ], [ 57, 58 ], [ 50, 59 ], [ 59, 60 ], [ 8, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 73, 80 ], [ 80, 81 ], [ 8, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 87, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 82, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 99, 100 ], [ 94, 101 ], [ 101, 102 ], [ 94, 103 ], [ 103, 104 ], [ 8, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 6, 111 ], [ 111, 112 ] ]
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int timesCounter=0;\n int maxCounter=0;\n \n for(int i=0; i<A; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }\n \n for(int i=0; i<B; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }\n \n for(int i=0; i<C; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }\n \n System.out.println(maxCounter);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int timesCounter=0;\n int maxCounter=0;\n \n for(int i=0; i<A; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }\n \n for(int i=0; i<B; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }\n \n for(int i=0; i<C; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }\n \n System.out.println(maxCounter);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int timesCounter=0;\n int maxCounter=0;\n \n for(int i=0; i<A; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }\n \n for(int i=0; i<B; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }\n \n for(int i=0; i<C; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }\n \n System.out.println(maxCounter);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int timesCounter=0;\n int maxCounter=0;\n \n for(int i=0; i<A; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }\n \n for(int i=0; i<B; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }\n \n for(int i=0; i<C; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }\n \n System.out.println(maxCounter);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B = sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "int C = sc.nextInt();", "C", "sc.nextInt()", "sc.nextInt", "sc", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int timesCounter=0;", "timesCounter", "0", "int maxCounter=0;", "maxCounter", "0", "for(int i=0; i<A; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }", "int i=0;", "int i=0;", "i", "0", "i<A", "i", "A", "i++", "i++", "i", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter++;\n }", "if(timesCounter == K){\n break;\n }", "timesCounter == K", "timesCounter", "K", "{\n break;\n }", "break;", "timesCounter++", "timesCounter", "maxCounter++", "maxCounter", "for(int i=0; i<B; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }", "int i=0;", "int i=0;", "i", "0", "i<B", "i", "B", "i++", "i++", "i", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n }", "if(timesCounter == K){\n break;\n }", "timesCounter == K", "timesCounter", "K", "{\n break;\n }", "break;", "timesCounter++", "timesCounter", "for(int i=0; i<C; i++){\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }", "int i=0;", "int i=0;", "i", "0", "i<C", "i", "C", "i++", "i++", "i", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }", "{\n if(timesCounter == K){\n break;\n }\n timesCounter++;\n maxCounter--;\n }", "if(timesCounter == K){\n break;\n }", "timesCounter == K", "timesCounter", "K", "{\n break;\n }", "break;", "timesCounter++", "timesCounter", "maxCounter--", "maxCounter", "System.out.println(maxCounter)", "System.out.println", "System.out", "System", "System.out", "maxCounter", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int K = sc.nextInt(); int timesCounter=0; int maxCounter=0; for(int i=0; i<A; i++){ if(timesCounter == K){ break; } timesCounter++; maxCounter++; } for(int i=0; i<B; i++){ if(timesCounter == K){ break; } timesCounter++; } for(int i=0; i<C; i++){ if(timesCounter == K){ break; } timesCounter++; maxCounter--; } System.out.println(maxCounter); } }