Microsoft Windows XP [版本 5.1.]
(C) 版权所有 - Microsoft Corp. C:\Documents and Settings\Administrator>e: E:\>dir
驱动器 E 中的卷没有标签。
卷的序列号是 000A-A2B1 E:\ 的目录 -- : <DIR> ADSafe
-- : <DIR> OIPackages
-- : <DIR> QQ
-- : <DIR> sougou
个文件 字节
个目录 ,,, 可用字节 E:\>cd OIPackages E:\OIPackages>cd Dev-Cpp E:\OIPackages\Dev-Cpp>cd MinGW32 E:\OIPackages\Dev-Cpp\MinGW32>cd bin E:\OIPackages\Dev-Cpp\MinGW32\bin>g++ -g e:\a.cpp -o a
g++: e:\a.cpp: No such file or directory
g++: no input files E:\OIPackages\Dev-Cpp\MinGW32\bin>g++ -g f:\a.cpp -o a E:\OIPackages\Dev-Cpp\MinGW32\bin>gdb a
GNU gdb 6.8
Copyright (C) Free Software Foundation, Inc.
License GPLv3+: GNU GPL version or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) l
return pos==a.pos?r<a.r:pos<a.pos;
}
}b[N];
int n,m,l,r,a[N],f[N];
ll res,ans1[N],ans2[N];
ll gcd(ll a,ll b){
if(!b) return a;
return gcd(b,a%b);
}
int main(){
(gdb)
//freopen("hose.in","r",stdin);
//freopen("hose.out","w",stdout);
n=read();m=read();
for(int i=;i<=n;i++) a[i]=read();
int k=sqrt(n*1.0)+0.5;
for(int i=;i<=m;i++){
b[i].l=read();b[i].r=read();
b[i].t=i;b[i].pos=b[i].l/k;
}
sort(b+,b+m+);
(gdb)
memset(f,,sizeof f);
l=;r=;res=;
for(int i=;i<=m;i++){
while(r>b[i].r){
res-=(ll)f[a[r]]-;
f[a[r]]--;
r--;
}
while(r<b[i].r){
r++;
(gdb)
f[a[r]]++;
res+=(ll)f[a[r]]-;
}
while(l>b[i].l){
l--;
f[a[l]]++;
res+=(ll)f[a[l]]-;
}
while(l<b[i].l){
res-=(ll)f[a[l]]-;
(gdb)
f[a[l]]--;
l++;
}
ans1[b[i].t]=res;
ans2[b[i].t]=(ll)(r-l+)*(r-l)/;
}
for(int i=;i<=m;i++){
if(!ans1[i]){
puts("0/1");
continue;
(gdb)
}
ll gg=gcd(ans1[i],ans2[i]);
printf("%lld/%lld\n",ans1[i]/gg,ans2[i]/gg);
//printf("%I64d/%I64d\n",ans1[i]/gg,ans2[i]/gg);
}
return ;
}(gdb)
Line number out of range; f:\a.cpp has lines.
(gdb)
Line number out of range; f:\a.cpp has lines.
(gdb) b
Breakpoint at 0x40178a: file f:\a.cpp, line .
(gdb) b if i=
No default breakpoint address now.
(gdb) n
The program is not being run.
(gdb) s
The program is not being run.
(gdb) continue
The program is not being run.
(gdb) p i
No symbol "i" in current context.
(gdb) p n
$ =
(gdb) p *a@N
$ = { <repeats times>}
(gdb) display i
No symbol "i" in current context.
(gdb) i b
Num Type Disp Enb Address What
breakpoint keep y 0x0040178a in main at f:\a.cpp:
(gdb) set i=
Ambiguous set command "i=100": .
(gdb) p gcd(,)
You can't do that without a process to debug.
(gdb)

未完待续

gdb命令整理的更多相关文章

  1. GDB技巧整理

    https://blog.atime.me/note/gdb-tricks.html 整理常用的gdb技巧. 常用命令 常用的gdb命令... 启动gdb 直接运行 gdb --args prog a ...

  2. GDB命令行最基本操作

    程序启动: A.冷启动 gdb program              e.g., gdb ./cs gdb –p pid                 e.g., gdb –p `pidof c ...

  3. IOS开发--常用的基本GDB命令

    gdb不是万能的,可是没有gdb却是万万不能的.这里给大家简单介绍下iOS开发中最基本的gdb命令. po po是print-object的简写,可用来打印所有NSObject对象.使用举例如下: ( ...

  4. jLink(v8)GDB 命令总结

    /** ****************************************************************************** * @author    Maox ...

  5. Linux学习笔记15——GDB 命令详细解释【转】

    GDB 命令详细解释 Linux中包含有一个很有用的调试工具--gdb(GNU Debuger),它可以用来调试C和C++程序,功能不亚于Windows下的许多图形界面的调试工具. 和所有常用的调试工 ...

  6. 常用git命令整理

    花了一点时间来熟悉和整理git常用命令. 推荐的git学习资料:1.搜“Git Community Book 中文版.pdf”,git社区书,内容全面且简明扼要,第一推荐2.搜“Git权威指南.pdf ...

  7. Xcode GDB 命令list

    此文下半部分为转载:但是这里有一些我自己使用技巧,结合下面的文章,我们会有更多的收获,在此感谢原创者.     --------------------- 关于调试异常崩溃: 一般崩溃是由内存使用错误 ...

  8. 常用的shell命令整理

    工作快一年了,shell命令也玩了一年了.还是有点积累的,下面是本人常用的. 1.pwd | xargs -i basename {}   获取当前所在目录的名称 2.ps -ef|grep -w   ...

  9. Windows常用的一些DOS命令整理

    Windows常用的一些DOS命令整理.. MS DOS 命令大全 ---清空Dos屏幕使用命令:cls -- Dos切换当前目录到D盘:cd d: 一.基础命令 1 dir 无参数:查看当前所在目录 ...

随机推荐

  1. Bootstrap登录样式

    样式1 <!--bs中所有的均应该包裹在其中.--> <div class="container"> <!-- row是珊栏系统的包裹容器--> ...

  2. Allegro PCB -如何做自定义焊盘

    1.如何创建自定义焊盘,比如这种形状的焊盘. (1).打开PCB Editor –>Allegro PCB Design ->New,在类型中选择Shape symbol,并输入名字,比如 ...

  3. Android启动脚本init.rc(2)

    在Android中使用启动脚本init.rc,可以在系统的初始化中进行简单的操作. init.rc启动脚本路径:system/core/rootdir/init.rc 内容: Commands:命令 ...

  4. ural1019 Line Painting

    Line Painting Time limit: 2.0 secondMemory limit: 64 MB The segment of numerical axis from 0 to 109  ...

  5. CentOS7 开源跳板机(堡垒机) Jumpserver

    开源跳板机(堡垒机)Jumpserver 环境 CentOS 7   x64       关闭 selinux  firewalld jumpserver: 172.24.0.14 testserve ...

  6. 一元线性回归分析及java实现

    http://blog.csdn.net/hwwn2009/article/details/38414911 一元线性回归分析及java实现 2014-08-07 11:02 1072人阅读 评论(0 ...

  7. LPC1768的USB使用-枚举过程

    枚举过程如下 #ifndef __USBCORE_H__ #define __USBCORE_H__ /* USB端点0 发送数据结构体*/ typedef struct _USB_EP_DATA { ...

  8. AFNetworking3.0为何弃用了NSURLConnection

    http://blog.csdn.net/qq_34101611/article/details/51698524 上篇博客说到AFNetworking3.0只提供了NSURLSession的支持.其 ...

  9. ue4中窗口打开web地址

    首先打开项目,设置,widgets,启用webbroswer 新建一个蓝图, 在控件栏里就可以找到添加webbroswer 设置initial url就可以打开网页了, 项目中还用到获取界面参数,与界 ...

  10. iOS开发——Reachability和AFNetworking判断网络连接状态

    一.Reachability // 监听网络状态改变的通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selec ...