This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| import static java.lang.Math.*; | |
| public class Main { | |
| BufferedReader in; | |
| PrintWriter out; | |
| StringTokenizer st; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| import static java.lang.Math.*; | |
| public class Main { | |
| BufferedReader in; | |
| PrintWriter out; | |
| StringTokenizer st; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int rec(int n, int cnt) { | |
| if (cnt == 0) { | |
| return n == 0 ? 1 : 0; | |
| } | |
| int ret = dp[cnt][n]; | |
| if (ret == -1) { | |
| ret = 0; | |
| for (int p : primes) { | |
| if (p <= n) { | |
| ret += rec(n - p, cnt - 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| import java.math.*; | |
| import org.omg.CORBA.MARSHAL; | |
| public class Radarset implements Runnable { | |
| static BufferedReader in; | |
| static PrintWriter out; | |
| static StringTokenizer st; | |
| static Random rnd; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static final String[] QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID = // | |
| { // | |
| "SELECT * FROM " + TABLE_NAME + " WITH(NOLOCK)" + // | |
| " WHERE " + C_USER_ID + "=?" + // | |
| " AND " + C_USER_PHOTO_ALBUM_ID + " IS NULL" + // | |
| " AND " + CRITERIA_NOTDELETED, // | |
| " ", //empty parameter must set for every call | |
| " ORDER BY " + C_SEQUENCE + " DESC"// | |
| }; | |
| private final static int QUERY_GET_PERSONAL_PHOTOS_BY_FRIEND_ID_CRITERIA_NOT_REJECTED_INDEX = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INFO | jvm 1 | 2013/08/21 17:24:33 | [GC 666769K->144433K(670080K), 0.0128970 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:34 | [GC 666929K->144465K(669952K), 0.0075600 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:36 | [GC 666833K->144561K(670016K), 0.0089250 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:37 | [GC 666929K->144497K(669888K), 0.0243870 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:39 | [GC 666737K->144529K(669952K), 0.0224280 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:40 | [GC 666769K->144593K(669952K), 0.0135690 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:41 | [GC 666833K->144569K(669888K), 0.0190190 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:42 | [GC 666809K->144577K(669888K), 0.0089020 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:43 | [GC 666689K->144545K(669888K), 0.0191780 secs] | |
| INFO | jvm 1 | 2013/08/21 17:24:45 | [GC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Solution1 { | |
| Solution1() { | |
| String s = "abccba"; | |
| int []letters = new int[26]; | |
| for (int i = 0; i < s.length(); ++i) { | |
| letters[s.charAt(i) - 'a']++; | |
| } | |
| int cnt = 0; | |
| int sum = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| boolean DEBUG = true; | |
| void dbg(Object ...args) { | |
| if(!DEBUG) | |
| return; | |
| for(Object o : args) | |
| System.err.print(o + " "); | |
| System.err.println(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| import javax.management.RuntimeErrorException; | |
| import static java.lang.Math.*; | |
| public class Solution { | |
| BufferedReader in; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Test { | |
| static class Timer { | |
| long time; | |
| long current; | |
| public void reset() { |