当前位置: 首页 > wzjs >正文

哪里需要人做钓鱼网站seo简单优化

哪里需要人做钓鱼网站,seo简单优化,月编程做网站,四川建筑职业技术学院教务网目录 题目地址 做题情况 A 题 B 题 C 题 D 题 E 题 F 题 牛客竞赛主页 题目地址 牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ 做题情况 A 题 输出两个不是同一方位的字符中的任意一个就行 import java.io.*; import java.math.*; import java…

目录

题目地址

做题情况

A 题

B 题

C 题

D 题

E 题

F 题

牛客竞赛主页

题目地址

牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ

做题情况

A 题

输出两个不是同一方位的字符中的任意一个就行

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {char a=sc.nextChar();if(a=='U'||a=='D') {dduoln('L');}else {dduoln('U');}}public static void main(String[] args) throws Exception {int t = 1;
//        t = sc.nextInt();while (t-- > 0) {solve();}}static <T> void dduo(T t) {System.out.print(t);}static <T> void dduoln(T t) {System.out.println(t);}}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

B 题

可以稍微贪心一下

构造 1 2 1 2 1 2 1 2 1 2

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {int n=sc.nextInt();for(int i=0;i<n;i++) {if(i%2==0) {dduo(1+" ");}else {dduo(2+" ");}}dduoln("");}public static void main(String[] args) throws Exception {int t = 1;t = sc.nextInt();while (t-- > 0) {solve();}}static <T> void dduo(T t) {System.out.print(t);}static <T> void dduoln(T t) {System.out.println(t);}}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

C 题

通过打表发现

1212/12

123123/123

112112/112

都能除尽

所以 我 直接 (str+""+str) /str 求出结果

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {String str=sc.next();BigInteger b=new BigInteger(str+str);BigInteger c=new BigInteger(str);dduoln(b.divide(c));}public static void main(String[] args) throws Exception {int t = 1;t = sc.nextInt();while (t-- > 0) {solve();}}static <T> void dduo(T t) {System.out.print(t);}static <T> void dduoln(T t) {System.out.println(t);}}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

D 题

模拟题

我的解法是先求出位于 (1,1)(2,2)(3,3)(4,4) 点要多少步

不难是 9 ,25, 49, 81...步

我们发现是奇数的平方

所以先求出要求的这个点是从哪个开始的 即(a,a)

然后算到(a,a)一共要多少步

求出还剩多少步

剩下了多少步然后是 在上面走 在右边走 在下面走 在左边走 在上面走 根据 a 可以算出每条边各需要多少步

在每条边上更新剩下要走的步数

即可求出

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {long n=sc.nextLong();long ii=0;ii=(long) Math.sqrt(n);ii+=1;if(ii%2==0) {ii++;}ii-=2;
//    	dduoln(ii);
//    	
//    	for(int i=1;i<=1e9;i+=2) {
//    		if(i*i>n) {
//    			ii=i-2;
//    			break;
//    		}
//    	}
//    	dduoln(ii);long a=(ii-1)/2; // 起始位置(a,a)
//    	dduoln(a+" "+a);long ans=(n-ii*ii); // 剩下多少步
//    	dduoln(ans);if(ans==0) {dduoln(a+" "+a);return;}else if(ans==1) {dduoln( (a+1) +" "+a);return;}long duanbian=a*2+1;long changbian=(a+1)*2;ans-=1;// 右if(ans<duanbian) {dduoln((a+1)+" "+(a-ans));return;}ans-=duanbian;// 下if(ans<changbian) {dduoln((a+1-ans)+" "+(-a-1));return;}ans-=changbian;// 左if(ans<changbian) {dduoln((-a-1)+" "+(-a-1+ans));return;}ans-=changbian;dduoln((-a-1+ans)+" "+(a+1));}public static void main(String[] args) throws Exception {int t = 1;t = sc.nextInt();while (t-- > 0) {solve();}}}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

E 题

动态规划

首先知道了 第一次可以到达 1 6

第二次可以到达 2 12

第三次可以到达 3 18

以此类推

维护一个 dp 数组 代表的是到达当前位置获取到的最大贡献值

再在每次运动 都要 for(1-6) 找一下这六步对 dp 数组的更新

需要注意的是 不要访问到数组外面去

最后找出 dp 数组中的最大值就行

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {int n = sc.nextInt();  // n个数int k = sc.nextInt();  // 两次int[] a = new int[n]; // 每个数的数值for (int i = 0; i < n; i++) {a[i] = sc.nextInt();}long[] dp = new long[n + 1];Arrays.fill(dp, Long.MIN_VALUE);dp[0] = 0;for (int step = 1; step <= k; step++) {long[] current = new long[n + 1];Arrays.fill(current, Long.MIN_VALUE);// 求出当前可到达的位置int xmin = step - 1;int xmax = Math.min(6 * (step - 1), n); 
//            dduoln(xmin+" "+xmax);for (int x = xmin; x <= xmax; x++) {for (int d = 1; d <= 6; d++) {int j = x + d;if (j > n) {continue;}current[j]=Math.max(current[j],dp[x] + a[j - 1]);}}dp = current;}int maxfoot = Math.min(6 * k, n); // 最大步数long max = Long.MIN_VALUE;for (int i = k; i <= maxfoot; i++) {max=Math.max(dp[i], max);}dduoln(max);}public static void main(String[] args) throws Exception {int t = 1;
//        t = sc.nextInt();while (t-- > 0) {solve();}}static <T> void dduo(T t) {System.out.print(t);}static <T> void dduoln(T t) {System.out.println(t);}}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

F 题

BFS

import java.io.*;
import java.math.*;
import java.util.*;public class Main {static IOS sc=new IOS();static final int MOD = 998244353;public static void solve() throws IOException {int startX=0, startY=0, endX=0, endY=0;int n = sc.nextInt();int m = sc.nextInt();int h = sc.nextInt();char[][] grid = new char[n + 1][m + 1];  int[][] minTime = new int[n + 1][m + 1];for (int i = 0; i <= n; i++) {Arrays.fill(minTime[i], Integer.MAX_VALUE);}for (int i = 1; i <= n; i++) {String s = sc.next();for (int j = 1; j <= m; j++) {grid[i][j] = s.charAt(j-1);if (grid[i][j] == '*') { // 记录水源的位置startX = i;startY = j;} else if (grid[i][j] == '%') { // 记录终点的位置endX = i;endY = j;}}}int ans=0;PriorityQueue<int[]> pq = new PriorityQueue<>((a, b) -> a[0] - b[0]);pq.offer(new int[]{0, startX, startY, 1});while (!pq.isEmpty()) {int[] cur = pq.poll();int time = cur[0], x = cur[1], y = cur[2], state = cur[3];if (x == endX && y == endY) { // 到达了终点ans=time;break;}if (state == 0 && minTime[x][y] <= time) continue;minTime[x][y] = Math.min(minTime[x][y], time);if (x + 1 <= n) {if (grid[x + 1][y] == '#') {if (y - 1 >= 1 && grid[x][y - 1] != '#') {pq.offer(new int[]{time + 1, x, y - 1, 0});}if (y + 1 <= m && grid[x][y + 1] != '#') {pq.offer(new int[]{time + 1, x, y + 1, 0});}if (state == 1) {pq.offer(new int[]{time + h + 1, x + 1, y, 1});}}else {pq.offer(new int[]{time + 1, x + 1, y, 1});}}ans=Integer.MAX_VALUE;}dduoln(ans == Integer.MAX_VALUE ? -1 : ans);}public static void main(String[] args) throws Exception {int t = 1;
//        t = sc.nextInt();while (t-- > 0) {solve();}}static <T> void dduo(T t) {System.out.print(t);}static <T> void dduoln(T t) {System.out.println(t);}}class Node implements Comparable<Node> {int x, y, nowT, abi;public Node(int x, int y, int nowT, int abi) {this.x = x;this.y = y;this.nowT = nowT;this.abi = abi;}@Overridepublic int compareTo(Node other) {return Integer.compare(other.nowT, this.nowT); // 按照 nowT 值进行比较,形成最大堆}
}class IOS{BufferedReader bf;StringTokenizer st;BufferedWriter bw;public IOS(){bf=new BufferedReader(new InputStreamReader(System.in));st=new StringTokenizer("");bw=new BufferedWriter(new OutputStreamWriter(System.out));}public String nextLine() throws IOException{return bf.readLine();}public String next() throws IOException{while(!st.hasMoreTokens()){st=new StringTokenizer(bf.readLine());}return st.nextToken();}public char nextChar() throws IOException{return next().charAt(0);}public int nextInt() throws IOException{return Integer.parseInt(next());}public long nextLong() throws IOException{return Long.parseLong(next());}public double nextDouble() throws IOException{return Double.parseDouble(next());}public float nextFloat() throws IOException{return Float.parseFloat(next());}public BigInteger nextBigInteger() throws IOException{return new BigInteger(next());}public BigDecimal nextDecimal() throws IOException{return new BigDecimal(next());}
}

牛客竞赛主页

她说喜欢是装的的比赛主页

http://www.dtcms.com/wzjs/72157.html

相关文章:

  • 哪个网站有帮忙做公开课课件直播营销的优势有哪些
  • 网站建设 网页开发广州seo代理计费
  • 做视频网站怎么挣钱seo快速排名外包
  • 手工制作小钱包百度搜索引擎优化方式
  • 青县建设银行网站2022网络热词30个
  • 有域名了如何做网站推广普通话手抄报内容资料
  • 免费做优化的网站百度seo排名优化系统
  • 除了淘宝还有哪些购物网站seo新人怎么发外链
  • 网站建设与管理的实训广州网站推广服务
  • 移动端网站开发框架百度搜索引擎的特点
  • 网站用ai做还是pssem与seo的区别
  • 腾讯云主机网站建设教程关键词规划师
  • 建设交易平台网站多少钱全国人大常委会
  • 上位机软件开发教程优化方案英语
  • 在台湾做色聊的网站犯法不推广是做什么工作的
  • 专业的集团网站设计公司南宁seo咨询
  • 实体店做网站有用吗seo教程排名第一
  • dedecms制作网站教程企业文化建设
  • 温岭网站建设应用商店app下载
  • 商城网站建设二次开发苏州网站关键字优化
  • 网站管理员怎么做板块建设优秀的品牌策划案例
  • 网站一般采用的设计方案在线识图
  • 做ppt赚钱的网站网络营销项目策划书
  • 怎样做视频电影网站app投放渠道有哪些
  • 做网站关于创新的互联网公司
  • 1微信网站怎么建设成都官网seo服务
  • b2b网站对比深圳网络营销推广渠道
  • 旗县长安网站建设思路淘宝流量平台
  • wordpress能否做网站百度排行榜明星
  • 网站忧化技巧百度关键词推广一年多少钱