ACMÖÐʹÓÃJAVAµÄ½éÉÜ
Chapter I.
JavaµÄÓÅȱµã¸÷ÖÖÊéÉ϶¼ÓУ¬ÕâÀïֻ˵˵ÓÃJava×öACM-ICPCµÄÌص㣺
(1) ×îÃ÷ÏԵĺô¦ÊÇ£¬Ñ§»áJava£¬¿ÉÒԲμÓJava Challenge
(2) ¶ÔÓÚÊìϤC/C++µÄ³ÌÐòÔ±À´Ëµ£¬Java ²¢²»ÄÑѧ£¬ÕÒ±¾Ê飬һÁ½ÖÜÒµÓàʱ¼ä¾Í¿ÉÒԸ㶨ÁË¡£µ±È»£¬ÕâÀïÖ»ÊÇÖ¸Ò»°ã±à³Ì£¬ÏëÊìϤËùÓеÄJava¿â»¹ÊÇÐèҪЩʱ¼äµÄ¡£ÊÂʵÉÏ£¬Java Ö»Ï൱ÓÚC++µÄÒ»¸ö¸Ä½ø°æ£¬ËùÓеÄÓï·¨¶¼¼¸ºõÊÇC++µÄ£¬ºÜÉÙÓб䶯¡£
(3) ÔÚÒ»°ã±ÈÈüÖУ¬Java³ÌÐò»áÓжîÍâµÄʱ¼äºÍ¿Õ¼ä£¬¶øʵ¼ÊÉϾ¹ýʵÑ飬ÔÚÖ´ÐмÆËãÃܼ¯ÈÎÎñµÄʱºòJava²¢²»±ÈC/C++Âý¶àÉÙ£¬Ö»ÊÇIO²Ù×÷½ÏÂý¶øÒÑ¡£
(4) Java ¼òµ¥¶ø¹¦ÄÜÇ¿´ó£¬ÓÐЩ¶«Î÷ÓÃJavaʵÏÖÆðÀ´¸üΪ·½±ã£¬±ÈÈç¸ß¾«¶È¡£
(5) ÓÃJava²»Ò×·¸Ï¸Î¢µÄ´íÎ󣬱ÈÈçC/C++ÖеÄÖ¸Õ룬 “if (n = m) ... ” µÈ
(6) Ä¿Ç°À´¿´EclipseÒѳɻù±¾ÅäÖã¬Ð´Java³ÌÐò·´¶ø±ÈC/C++¸ü·½±ãµ÷ÊÔ¡£ÔÚ¾ßÌ徺ÈüʱҲËã¶àÒ»ÖÖÑ¡Ôñ¡£
(7) ѧ»áJava¶ÔÒÔºó¹¤×÷Óкô¦¡£ÏÖÔÚ¹úÍâºÜ¶àµØ·½»áJavaµÄÈ˱ȻáC/C++µÄÈ˶ࡣ
( »áJava¿ÉÒÔʹÄã¿´ÆðÀ´¸üÏñżÌãÀදÎţ£© hoho~
Chapter II.
ÏÂÃæ˵һÏÂACM-ICPC¶ÓÔ±³õÓÃJava±à³ÌËùÓöµ½µÄһЩÎÊÌ⣺
1. »ù±¾ÊäÈëÊä³ö£º
(1) JDK 1.5.0 ÐÂÔöµÄScannerÀàΪÊäÈëÌṩÁËÁ¼ºÃµÄ»ù´¡£¬¼òÖ±¾ÍÊÇΪACM-ICPC¶øÉèµÄ¡£
Ò»°ãÓ÷¨Îª£º
import java.io.*
import java.util.*
public class Main
{
public static void main(String args[])
{
Scanner cin = new Scanner(new BufferedInputStream(System.in));
...
}
}
µ±È»Ò²¿ÉÒÔÖ±½Ó Scanner cin = new Scanner(System.in);
Ö»ÊǼÓBuffer¿ÉÄÜ»á¿ìһЩ
(2)
¶ÁÒ»¸öÕûÊý£º int n = cin.nextInt(); Ï൱ÓÚ scanf("%d", &n); »ò cin >> n;
¶ÁÒ»¸ö×Ö·û´®£ºString s = cin.next(); Ï൱ÓÚ scanf("%s", s); »ò cin >> s;
¶ÁÒ»¸ö¸¡µãÊý£ºdouble t = cin.nextDouble(); Ï൱ÓÚ scanf("%lf", &t); »ò cin >> t;
¶ÁÒ»ÕûÐУº Strin
Ïà¹ØÎĵµ£º
À´×Ôhttp://www.ilovematlab.cn/thread-30836-1-1.html
matlab java.lang.OutOfMemoryError
JavaÐéÄâ»úÄÚ´æ²»¹»ÓÃÁË.¿ÉÒÔÔö¼Ó×î´óÄÚ´æÉèÖÃ.
1. ²éÕÒmatlab¸ù·¾¶.ÔÚmatlabÃüÁîÐÐÖÐÇÃÈë:matlabroot
ÏÔʾ¸ù·¾¶,Èç:C:\MATLAB7
2.²é¿´µ±Ç°JavaÐéÄâ»ú×î´ó¶ÑÄÚ´æ, ÇÃÈë:java.lang.Runtime.getRuntime.maxMemory
3.²é¿ ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......
Õâ¶Ìʱ¼ä£¬Íê³ÉÁËÒ»¸ö½ÏΪ¼òµ¥µÄϵͳ Ò»¸ö½ÌÓýÅàѵ»ú¹¹µÄÐÅÏ¢¹ÜÀíϵͳ£¬Ö÷ÒªÊÇͨ¹ý²»Í¬µÄ½ÇÉ«·ÖÅä½øÈ벻ͬµÄ½çÃ棬×öÏàÓ¦µÄ¹¤×÷£¬ÒòΪÔÚȨÏÞ·½Ã滹ûŪºÃ£¬Ã»ÓÐÓõ½Ajax¡£½ÇÉ«ÓÐϵͳ¹ÜÀíÔ±£¬×ÉѯÖ÷¹Ü£¬×Éѯʦ£¬Êг¡×¨Ô±£¬Êг¡²¿Ö÷¹Ü£¬ÁªÏµÈË£¬µÈµÈ¡£ÒòΪµ±³õдµÄʱºò£¬ÏµÍ³µÄÀ©Õ¹ÐÔ»¹¿ÉÒÔ£¬ËùÒÔÄã¿ÉÒÔÔö¼ÓÒ»¸ö½ÇÉ«£¬ ......
°üÊÇJavaÓïÑÔÌṩµÄÒ»ÖÖÇø±ðÀàÃû×ÖÃüÃû¿Õ¼äµÄ»úÖÆ£¬ËüÊÇÀàµÄÒ»ÖÖÎļþ×éÖ¯ºÍ¹ÜÀí·½Ê½¡¢ÊÇÒ»×鹦ÄÜÏàËÆ»òÏà¹ØµÄÀà»ò½Ó¿ÚµÄ¼¯ºÏ¡£Java packageÌṩÁË·ÃÎÊȨÏÞºÍÃüÃûµÄ¹ÜÀí»úÖÆ£¬ËüÊÇJavaÖкܻù´¡È´Óַdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£
Ò»¡¢°üµÄ×÷ÓÃ
1 °Ñ¹¦ÄÜÏàËÆ»òÏà¹ØµÄÀà»ò½Ó¿Ú×éÖ¯ÔÚͬһ¸ö°üÖУ¬·½±ãÀàµÄ²éÕÒºÍʹÓá£
2 Èçͬ ......
À´±±¾©ÒѾÊǽü20ÌìÁË£¬Æð³õ¸Õµ½¶ÔÎҵĴò»÷ȷʵ²»Ð¡£¬ºÜÏë»Ø¼Ò µÄ¸Ð¾õ£¬µ«ÊÇÀ´µ½ÁË´«ÖÇ£¬À´µ½ÁËÕâÀÐÄÀï¸Ð¾õºÃ¶àÁË£¬ÈËÉúµØ²»Ê죬È˵ÄÐÄÀïÒ»°ã¶¼ÊǺܹ¶ÀµÄ£¬ÏëÔÚÐÄÀïÕÒ¸öÒÀ¿¿£¬ÕÒ¸öÅóÓÑÄÜÒ»Æð³öÈ¥Í棬ÁÄÌ죬ѧϰ¡£À´µ½Á˱±¾©£¬ÊÇÒ»¸öȫеÄÉú»î·½Ê½£¬Ê²Ã´¶¼Òª¿¿×Ô¼ºÁË£¬³öÃÅÕæµÄºÜÄÑ£¬ÓÈ ......