csu oj 1341 string and arrays】的更多相关文章

Description 有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,……,第N行,从左至右依次记为第1列,第2列,……,第N列. 对于这个矩阵会进行一系列操作,但这些操作只有两类: (1) R: 将矩阵逆时针旋转90度: (2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N.   Input 输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据. 对于每组测试数据,第一行包含一个整数N (1 &l…
Description 有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,--,第N行,从左至右依次记为第1列,第2列,--,第N列.    对于这个矩阵会进行一系列操作,但这些操作只有两类:    (1) R: 将矩阵逆时针旋转90度:    (2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N. Input 输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据.    对于每组测试数据,第一行包含一…
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2072&pid=1 Problem B: String and Arrays Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 222  Solved: 56[Submit][Status][Web Board] Description 有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,……,第N行,从左至右依次记为第1列,第2列,………
Scanner import java.util.Scanner; /* public int nextInt(): to get a integer from keyboard public String next(): to get a string from keyboard,end with space; Scanner sc = new Scanner(System.in); */ Random import java.util.Random; // 构造方法: // public R…
最近项目中  List<String> bikeList = Arrays.asList(bikeuuids);报错 而且console里面没有特别有用的 bikeList.add("1"); bikeList.add("2"); bikeList.add("3"); 走到第二个的时候 就走异常了,考虑了下 Arrays.asList是固定的不能add 所以用 List<String> bikeList= new Arra…
1 字符串的概述和特点 字符串一旦创建,是不可变的. 有双引号的就是字符串 *** 2 字符串的三种构造方法 2-1 第一种: 格式:String str = new String();| :-| 2-2 第二种: 格式:char[] chararray = {'a','b'};| :-| String str2 = new String(chararray);| 2-3 第三种 格式:byte[] bytearray ={97,98};| :-| String str3 = new Strin…
Simple String Problem's Link:   http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1550 Mean: 略. analyse: 水题. Time complexity: O(n) Source code:  // Memory Time // 1347K 0MS // by : crazyacking // 2015-03-29-12.08 #include<map> #include<queue> #…
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1339 1339: 最后一滴血 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 319  Solved: 142[Submit][Status][Web Board] Description 在ACM/ICPC这样的程序设计竞赛中,最早解出一道题称为抢到FB(First Blood,第一滴血).现在ACM/ICPC世界总决赛甚至为每道题的FB设立了特别…
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1330 1330: 字符识别? Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 419  Solved: 296[Submit][Status][Web Board] Description 你的任务是写一个程序进行字符识别.别担心,你只需要识别1, 2, 3,如下: .*.  ***  *** .*.  ..*  ..* .*.  ***  ***…
一.String常用方法 1.subString(int beginIndex,int endIndex) 截取字符串 从beginIndex开始截取,截取endIndex-beginIndex的长度 案列: String str=”helloFriend”; str.subString(4,8);   //结果:oFri 2.   subString(int beginIndex) 从下标beginIndex截取到最后 案列: String str=”helloFriend”; str.sub…