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. FusionCharts生成报表应用

    1.需要组装要展示的数据,至于如何怎样去设计数据模型,看你要展示的图形和需要的数据就行了.来个简单的. 实体类,只有两个属性,也可以使用Bean里面的实体类,无所谓了. package com.gol ...

  2. SDAU课程练习--problemB(1001)

    题目描述 There is a pile of n wooden sticks. The length and weight of each stick are known in advance. T ...

  3. HDU 4393 Throw nails(优先队列)

    优先队列的应用 好坑,好坑,好坑,重要的事情说三遍! #include<iostream> #include<cstdio> #include<cstring> # ...

  4. .NET反射应用

    .Net中,在编写框架时,反射是最长用的一个知识点,在这举个小例子,旨在说明反射如何应用:本文只程序中只涉及到System.Type的应用,通过这个类可以访问关于任何数据类型的信息,注释部分涉及到Sy ...

  5. 【转】简单模拟angular的依赖注入

    原文:http://www.oschina.net/code/snippet_1181081_35136 代码片段 var angular = function(){}; Object.defineP ...

  6. 高橋君とカード / Tak and Cards

    高橋君とカード / Tak and Cards Time limit : 2sec / Stack limit : 256MB / Memory limit : 256MB Score : 300 p ...

  7. FMDB增删查改

    创建,插入,更新和删除:使用executeUpdate方法,而查询则用executeQuery 1.实例化FMDatabase //paths: ios下Document路径,Document为ios ...

  8. JQuery的插件开发——重点

    1.给JQuery全局对象扩展一个函数方法 $.log=function(){ /* 给全局对象$扩展一个函数*/ } $.log;//调用方法 2.给JQuery普通对象扩展一个函数方法 3.使用第 ...

  9. CSS——z-index

    1.特性 ①z-index的值表示谁压着谁.值大的压住值小的. ②只有定位的元素才有z-index 值,也就是说,浮动不可以,相对定位,绝对定位,固定定位都可以. ③z-index值没有单位,是一个正 ...

  10. 省市区三级联动插件:app-jquery-cityselect.js

    (function ($) { $.fn.cityselect = function (options) { var settings = $.extend ({}, options); this.e ...