ICode9

精准搜索请尝试: 精确搜索
  • Aizu - 01212022-01-14 10:30:57

    题目: Seven Puzzle - Aizu 0121 - Virtual Judge 分析: 使用BFS预处理,将所有状态预处理出来,然后逐个查找。 (我一开始直接搜的,超时) 使用知识:BFS,队列,哈希表。 代码: #include <iostream> #include <algorithm> #include <unordered_map> #include <queue> using namespace std; u

  • Aizu ITP1_1_A - Hello World2021-12-12 22:34:18

    Problem Welcome to Online Judge! Write a program which prints "Hello World" to standard output. Input There is no input for this problem. Output Print "Hello World" in a line. Sample Input No input Sample Output Hello World Solution

  • [AIZU]AIZU - 1146 POJ - 3011 Secrets in Shadows 计算几何2021-11-18 08:33:41

    传送门:Secrets in Shadows 题意: 给定\(n(n\le 100)\)个半径为\(1\)的圆柱体,假设太阳光是从无限远处来的平行于地面直线,圆柱会在地面上投射出无限长的矩形阴影。 宽度定义为这些矩形的宽度并,问宽度最大的太阳角度。 题解: 一开始以为是枚举两个圆心,然后垂直连线啥的,发现错了,但是网上

  • Ball Aizu - 0033 DFS搜索2020-08-21 20:00:48

    白书上的一题,因没判好范围把自己WA翻 #include<iostream> #define ll long long using namespace std; ll n,flag; ll arr[105]; void dfs(ll x,ll y,ll cnt){ if(cnt==11){ flag=1; return; } if(arr[cnt]>x) dfs(arr[cnt],y,cnt+1);

  • Aizu - 2170 Marked Ancestor2019-12-09 18:54:30

    题意:给出一颗树,有两种操作: 1. mark  u  标记结点u 2.query  u  询问离u最近的且被标记的祖先结点是哪个 让你输出所有询问的和。 显然一个暴力的做法是每次都直接修改,然后查询的话就一个一个地向祖先查询,直到一个被标记过的点. 让我们来优化一下这个暴力. 类似于一个题https

  • 【Aizu ALDS1_1_D --- Maximum Profit】2019-09-13 15:37:02

    【Aizu ALDS1_1_D --- Maximum Profit】 Description You can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, and sell them at a rate of 108 yen per dollar, you can obtain (108

  • 【Aizu - 0525】Osenbei (dfs)2019-07-16 11:51:51

    -->Osenbei 直接写中文了 Descriptions: 给出n行m列的0、1矩阵,每次操作可以将任意一行或一列反转,即这一行或一列中0变为1,1变为0。问通过任意多次这样的变换,最多可以使矩阵中有多少个1。 Sample Input 2 50 1 0 1 01 0 0 0 13 61 0 0 0 1 01 1 1 0 1 01 0 1 1 0 1 0 0 Sample Out

  • [Aizu] ITP2_11_A~D: 子集的枚举系列2019-06-15 08:49:23

    前言 ITP系列之使用位集枚举, 具体内容参见bitset PS: 感觉第三个与第四个拓展之后实用性较强 题目链接 ITP2_11_A: Enumeration of Subsets I ITP2_11_B: Enumeration of Subsets II ITP2_11_C: Enumeration of Subsets III ITP2_11_D: Enumeration of Combinations 求解 第一题

  • 搜索的应用--计算最优解:Aizu - ALDS1_4_D Allocation2019-06-07 19:01:04

    搜索的应用-计算最优解 题目: You are given nn packages of wiwi kg from a belt conveyor in order (i=0,1,...n−1i=0,1,...n−1). You should load all packages onto kk trucks which have the common maximum load PP. Each truck can load consecutive packages (more

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有