格式:类型,数组名字[数组长度];
比如:int a[10]; 表示定义了一个长度为10的数组,数组名为a,其中数组下标从0开始,即a[0], a[1], a[2]...a[9];
输入这10个数,可以使用for循环实现
for(int i=0; i<10; i++) cin>>a[i];
也可以对其中的某个值赋值,比如a[0] = 1,a[5] = 3;
整个数组的输出,也可以for循环实现。
可以把一维数组理解成,一维的表格。
RunID | User | Problem ID | Result | Memory | Time | Language | Code Length | Submit Time |
24228 | hjh123 | C | Presentation Error | 1544 KB | 0 ms | C++ | 277 bytes | 2020-07-08 13:28:53 |
24227 | hjh123 | C | Presentation Error | 1544 KB | 0 ms | C++ | 265 bytes | 2020-07-08 13:26:17 |
24226 | dhxxzch | C | Accepted | 1584 KB | 0 ms | C++ | 308 bytes | 2020-07-08 13:26:05 |
24225 | dhxxzch | C | Compile Error | 0 KB | 0 ms | C | 308 bytes | 2020-07-08 13:25:50 |
24224 | dhxxzch | C | Presentation Error | 1544 KB | 0 ms | C++ | 305 bytes | 2020-07-08 13:23:50 |
24222 | hjl123 | B | Compile Error | 0 KB | 0 ms | C | 223 bytes | 2020-07-08 13:21:21 |
24221 | hjh123 | B | Compile Error | 0 KB | 0 ms | C++ | 226 bytes | 2020-07-08 13:21:15 |
24220 | dhxxlhw | C | Presentation Error | 1584 KB | 0 ms | C++ | 309 bytes | 2020-07-08 13:20:46 |
24218 | hjl123 | B | Compile Error | 0 KB | 0 ms | C | 224 bytes | 2020-07-08 13:19:51 |
24217 | hjl123 | A | Compile Error | 0 KB | 0 ms | C | 190 bytes | 2020-07-08 13:19:05 |
24216 | hjl123 | A | Compile Error | 0 KB | 0 ms | C | 194 bytes | 2020-07-08 13:18:30 |
24215 | hjl123 | A | Compile Error | 0 KB | 0 ms | C | 196 bytes | 2020-07-08 13:17:57 |
24214 | dhxxlhw | B | Accepted | 1584 KB | 0 ms | C++ | 228 bytes | 2020-07-08 13:17:34 |
24212 | dhxxzch | B | Accepted | 1584 KB | 0 ms | C++ | 235 bytes | 2020-07-08 13:17:25 |
24210 | hjl123 | A | Compile Error | 0 KB | 0 ms | C | 204 bytes | 2020-07-08 13:16:25 |
24209 | dhxxlhw | B | Runtime Error | 1544 KB | 0 ms | C++ | 220 bytes | 2020-07-08 13:16:13 |
24208 | dhxxzch | B | Runtime Error | 1544 KB | 0 ms | C++ | 227 bytes | 2020-07-08 13:16:11 |
24207 | dhxxzch | A | Accepted | 1936 KB | 0 ms | C++ | 204 bytes | 2020-07-08 13:15:54 |
24205 | dhxxlhw | A | Accepted | 1936 KB | 0 ms | C++ | 184 bytes | 2020-07-08 13:15:45 |
24204 | dhxxzch | A | Compile Error | 0 KB | 0 ms | C | 204 bytes | 2020-07-08 13:15:41 |
24203 | hjh123 | A | Accepted | 1544 KB | 0 ms | C++ | 209 bytes | 2020-07-08 13:15:23 |
24202 | hjl123 | A | Compile Error | 0 KB | 0 ms | C | 204 bytes | 2020-07-08 13:15:04 |
14552 | dhxxlyn | E | Accepted | 1544 KB | 0 ms | C++ | 296 bytes | 2019-12-19 12:34:46 |
14551 | wahyx | D | Wrong Answer | 1544 KB | 0 ms | C++ | 391 bytes | 2019-12-19 12:33:07 |
14550 | dhxxlyn | C | Accepted | 1544 KB | 0 ms | C++ | 270 bytes | 2019-12-19 12:32:15 |
14549 | dhxxlyn | B | Accepted | 1544 KB | 0 ms | C++ | 210 bytes | 2019-12-19 12:29:59 |
14548 | dhxxlyn | A | Accepted | 1544 KB | 0 ms | C++ | 189 bytes | 2019-12-19 12:28:01 |
14547 | wahyx | D | Time Limit Exceed | 1540 KB | 1000 ms | C++ | 391 bytes | 2019-12-19 12:27:16 |
14546 | wahyx | D | Wrong Answer | 1544 KB | 0 ms | C++ | 392 bytes | 2019-12-19 12:25:41 |
14542 | dhxxlyn | D | Wrong Answer | 1544 KB | 0 ms | C++ | 356 bytes | 2019-12-19 12:19:50 |
14541 | wahyx | E | Accepted | 1544 KB | 0 ms | C++ | 296 bytes | 2019-12-19 12:10:37 |
14518 | wahyx | C | Accepted | 1544 KB | 0 ms | C++ | 270 bytes | 2019-12-18 14:41:52 |
14517 | wahyx | C | Presentation Error | 1544 KB | 0 ms | C++ | 270 bytes | 2019-12-18 14:39:49 |
14515 | wahyx | B | Accepted | 1544 KB | 0 ms | C++ | 210 bytes | 2019-12-18 14:33:38 |
14508 | wahyx | A | Accepted | 1544 KB | 0 ms | C++ | 183 bytes | 2019-12-18 14:29:40 |
14502 | dhxxhcxh | Accepted | 1544 KB | 0 ms | C++ | 251 bytes | 2019-12-18 14:08:35 | |
14489 | dhxxgjj | Wrong Answer | 1544 KB | 0 ms | C++ | 257 bytes | 2019-12-18 13:47:51 | |
14487 | dhxxgjj | E | Accepted | 1544 KB | 0 ms | C++ | 310 bytes | 2019-12-18 13:43:33 |
14461 | dhxxgjj | E | Wrong Answer | 1544 KB | 0 ms | C++ | 266 bytes | 2019-12-17 12:38:26 |
14458 | dhxxgjj | E | Wrong Answer | 1544 KB | 0 ms | C++ | 279 bytes | 2019-12-17 12:36:24 |
14456 | dhxxsjy | E | Accepted | 1544 KB | 0 ms | C++ | 310 bytes | 2019-12-17 12:31:58 |
14454 | dhxxhcxh | D | Wrong Answer | 1544 KB | 0 ms | C++ | 312 bytes | 2019-12-17 12:25:57 |
14453 | dhxxgjj | D | Accepted | 1544 KB | 0 ms | C++ | 253 bytes | 2019-12-17 12:24:43 |
14451 | dhxxhcxh | B | Accepted | 1544 KB | 0 ms | C++ | 252 bytes | 2019-12-17 12:18:21 |
14450 | dhxxhcxh | B | Wrong Answer | 1544 KB | 0 ms | C++ | 252 bytes | 2019-12-17 12:17:13 |
14446 | dhxxhcxh | C | Accepted | 1544 KB | 0 ms | C++ | 335 bytes | 2019-12-17 12:13:14 |
14444 | dhxxsjy | C | Accepted | 1544 KB | 0 ms | C++ | 342 bytes | 2019-12-17 12:12:45 |
14443 | dhxxhcxh | C | Presentation Error | 1544 KB | 0 ms | C++ | 335 bytes | 2019-12-17 12:11:39 |
14442 | dhxxgjj | D | Wrong Answer | 1544 KB | 0 ms | C++ | 236 bytes | 2019-12-17 12:10:40 |
14441 | dhxxgjj | D | Wrong Answer | 1544 KB | 0 ms | C++ | 205 bytes | 2019-12-17 12:09:22 |