UVA 11736 Debugging RAM
模拟题;
比赛的时候忘记把1变成64位的1了,跪了好久;
#include<cstdio>
#include<cstring>
#include<map>
#include<string>
using namespace std; unsigned long long val[];
int num[];
map<string,int>mp;
char s[];
char jkl[];
int main()
{
int d,b,v;
while(scanf("%d%d",&b,&v)!=EOF)
{
mp.clear();
for(int i=;i<v;i++)
{
val[i]=;
num[i]=;
}
for(int i=;i<v;i++)
{
scanf("%s",s);
scanf("%d",&d);
mp[s]=i;
num[i]=d;
}
gets(jkl);
int q;
char w;
for(int i=;i<v;i++)
{
unsigned long long tmp=;
for(int j=num[i]-;j>=;j--)
{
for(int k=b-;k>=;k--)
{
w=getchar();
if(w=='')
tmp+=((unsigned long long))<<(j*b+k);
}
gets(jkl);
}
val[i]=tmp;
}
scanf("%d",&q);
gets(jkl);
while(q--)
{
scanf("%s",s);
if(mp.find(s)==mp.end())printf("%s=\n",s);
else printf("%s=%llu\n",s,val[mp[s]]);
}
}
return ;
}
UVA 11736 Debugging RAM的更多相关文章
- Investigating Your RAM Usage
转载自:http://developer.android.com/intl/zh-cn/tools/debugging/debugging-memory.html Because Android is ...
- PC/UVa 题号: 110106/10033 Interpreter (解释器)题解 c语言版
, '\n'); #include<cstdio> #include<iostream> #include<string> #include<algorith ...
- [转]Debugging the Mac OS X kernel with VMware and GDB
Source: http://ho.ax/posts/2012/02/debugging-the-mac-os-x-kernel-with-vmware-and-gdb/ Source: http:/ ...
- UVa 10033 - Interpreter
题目大意:模拟题,有一些寄存器和随机访问内存,给你一些指令以及它们代表的操作,模拟操作即可. #include <cstdio> #include <cstring> #def ...
- The J-Link hardware debugging Eclipse plug-in
Quicklinks If you already know what are the features of the new plug-in and just want to know how to ...
- OpenGL ES 2: debugging, and improvements to VAO, VBO
OpenGL ES 2: debugging, and improvements to VAO, VBO http://www.altdevblogaday.com/2013/10/12/opengl ...
- Suspend to RAM和Suspend to Idle分析,以及在HiKey上性能对比
Linux内核suspend状态 Linux内核支持多种类型的睡眠状态,通过设置不同的模块进入低功耗模式来达到省电功能.目前存在四种模式:suspend to idle.power-on standb ...
- asp.net mvc4 简单的服务器监控开发之C#获取服务器CPU、RAM、TCP等系统信息(上)
一.背景 前段时间服务器出了点问题,加上学业愈来愈紧张,写博文分享的时间越来越少.虽然不是第一次在博客园上写经验,但是近期分享的博文得到了不少的朋友支持和指正,在这里内心非常感激和开心.希望以后能认真 ...
- Debugging into .NET Core源代码的两种方式
一.前言 .NET开源时间还不长,因为一直在做YOYOFx的关系,所似我常常有更深入的了解.NET Core和ASP.NET Core内容的需求,并且.NET Core平台与之前版本的变化太大,这也导 ...
随机推荐
- JUC全景图
JUC 并发编程全景图如下:
- 分布式算法(一致性Hash算法)
一.分布式算法 在做服务器负载均衡时候可供选择的负载均衡的算法有很多,包括: 轮循算法(Round Robin).哈希算法(HASH).最少连接算法(Least Connection).响应速度算法( ...
- Java多线程中的join()方法
一.join()方法介绍 join() 定义在Thread.java中.join()方法把指定的线程加入到当前线程,可以将两个交替执行的线程合并为顺序执行的线程.比如在线程B中调用了线程A的join( ...
- FPGA设计—UVM验证篇 Hello world
这里就不赘述UVM为何物了,做了半年多的FPGA设计验证工作,按需求一直是用VHDL编写测试程序,最近看了几天UVM验证方法学的书,感觉这是一种很好的验证工具,现在开始UVM的学习,于是准备用Mode ...
- 【转】prototype扩展的JavaScript常用函数库
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> ...
- Latex之CJK中文书签乱码[转]
在使用CJK宏包编辑中文时,可以使用不同的编码方式,一种是UTF-8格式:另外一种是GBK编码.在使用GBK编码时,生成的PDF格式中的文本是GBK的编码方式,因此大部分不支持GBK编码的PDF阅读器 ...
- New Lantern Version Available Upgrade Lantern for improved blocking resistance!
New Lantern Version Available Upgrade Lantern for improved blocking resistance! The new version: is ...
- try catch异常捕获
格式为: try { int i = int.Parse(Console.ReadLine()); //容易发生错误的语句 ...
- linux启动报错:kernel panic - not attempted to kill init
系统类型:CentOS 6.4(x64) 启动提示:Kernel panic - not syncing: Attempted to kill init 解决办法: 系统启动的时候,按下‘e’键进入g ...
- 对 ASP.NET 页面进行跟踪(Control Tree)
在页面头部加入属性 : Trace="True" 参考MSDN: https://msdn.microsoft.com/zh-cn/library/94c55d08(v=vs.10 ...