• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
TJU_Hacb
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2012年11月24日

2304. Japan Plotter Driver
摘要: 模拟题View Code 1 #include <cstdio> 2 #include <cstring> 3 4 int m, n; 5 char map[76][76]; 6 7 void swap(int &x, int &y) 8 { 9 int tmp = x; 10 x = y, y = tmp; 11 } 12 13 void print() 14 { 15 for (int i=0; i<m; i++) 16 { 17 if(!i) printf("+"); 18 printf... 阅读全文
posted @ 2012-11-24 20:15 Hacb 阅读(160) 评论(0) 推荐(0)
 
2911. Deli Deli
摘要: 水题一枚。题目大意:按照题目要求将所给单词转化为复数形式。View Code 1 #include <iostream> 2 #include <map> 3 #include <cstring> 4 5 using namespace std; 6 7 int main() 8 { 9 map<string, string>M;10 map<char, int>S;11 int l,n;12 S['a'] = 1, S['e'] = 1;13 S['i'] = 1, S['o& 阅读全文
posted @ 2012-11-24 20:06 Hacb 阅读(124) 评论(0) 推荐(0)
 
2807. Number Sort
摘要: 题目大意:给若干个数字,将他们按照个位、十位、百位、、、上的数字排序,如果该数字没有此位的话,加按照0处理。这个题目如果单纯枚举排序的话会超时,可以用字符串的方式进行解题。View Code 1 #include <cstdio> 2 #include <algorithm> 3 #include <iostream> 4 #include <cstring> 5 6 using namespace std; 7 8 struct N 9 {10 string num;11 int d;12 }number[1003];13 14 int cal 阅读全文
posted @ 2012-11-24 20:03 Hacb 阅读(152) 评论(0) 推荐(0)
 
3206. Dairy Queen
摘要: 题目大意:给你几种价值的钱币,问能有几种组合方式可以组成所给的钱数(每种钱币假设有无限多个)View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 5 using namespace std; 6 7 int dp[302], ans[302];//dp[i]表示钱数到达i的方法个数; 8 int n, c[10], cnt; 9 //利用动态规划的思想来解题;10 int main()11 {12 int j, i, k, tem;13 ... 阅读全文
posted @ 2012-11-24 19:50 Hacb 阅读(95) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3