总时间限制: 1000ms 内存限制: 65536kB 描述 找出正整数 M 和 N 之间(N 不小于 M)的所有真素数. 真素数的定义:如果一个正整数 P 为素数,且其反序也为素数,那么 P 就为真素数.例如,11,13 均为真素数,因为11的反序还是为11,13 的反序为 31 也为素数. 输入 输入两个数 M 和 N,空格间隔,1 <= M <= N <= 100000. 输出 按从小到大输出 M 和 N 之间(包括 M 和 N )的真素数,逗号间隔.如果之间没有真素数,则输出
总时间限制: 1000ms 内存限制: 65536kB 描述 找出正整数 M 和 N 之间(N 不小于 M)的所有真素数.真素数的定义:如果一个正整数 P 为素数,且其反序也为素数,那么 P 就为真素数.例如,11,13 均为真素数,因为11的反序还是为11,13 的反序为 31 也为素数. 输入 输入两个数 M 和 N,空格间隔,1 <= M <= N <= 100000. 输出 按从小到大输出 M 和 N 之间(包括 M 和 N )的真素数,逗号间隔.如果之间没有真素数,则输出
Minimum Sum Time Limit: 16000/8000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3769 Accepted Submission(s): 872 Problem Description You are given N positive integers, denoted as x0, x1 ... xN-1. Then give you
Super Mario Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5101 Accepted Submission(s): 2339 Problem Description Mario is world-famous plumber. His “burly” figure and amazing jumping abilit
输出:一个集合S,表示1~n以内所有的素数 import java.util.Scanner; public class 筛法求素数 { public static void main(String[] args) { int n; Scanner sc = new Scanner(System.in); n = sc.nextInt(); int[] arr = new int[n]; for (int i = 2; i < n; i++) { arr[i] = i; } for (int i
No Pain No Game Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2000 Accepted Submission(s): 851 Problem Description Life is a game,and you lose it,so you suicide. But you can not kill yours
Group Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1959 Accepted Submission(s): 1006 Problem Description There are n men ,every man has an ID(1..n).their ID is unique. Whose ID is i and i
DQUERY - D-query #sorting #tree English Vietnamese Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the number of distinct elements in the
洛谷P1440 求m区间内的最小值 ............................................................................... 以上代表我此时的心情,调了一个小时....只因为顺序,维护一个单调递增队列就好了,这里n很大,输出要优化,这才挽救了30分.. #include<bits/stdc++.h> using namespace std; int n,m; ],q[]; int top,tai; void Cin(int