在win32的评测系统下,long long scanf 要用"%I64d" ,而网上评测和考试要用"%lld",因此,难免有点麻烦,还会runtime error,所以这里提出一种新的方法:

#ifdef WIN32

#define AUTO "%I64d"

#else

#define AUTO "%lld"

#endif

这样把scanf("%I64d",...) 就转化为 scanf(AUTO,...)  就方便多了

long long 读数scanf的转换 #define的更多相关文章

  1. C语言scanf函数转换说明表及其修饰符表

    1. 对于上一篇文章,总结printf()输出,C库也包含了多个输入函数, scanf()是最常用的一个,也是经常与printf()经常一起搭配使用的函数之一. scanf()和printf()类似, ...

  2. Cocos2d-x程序Windows下VC中文乱码的解决(用MultiByteToWideChar进行转换,VC2010有非常厉害的execution_character_set)

    Cocos2d-x默认字符串常量编码都是UTF8的,而Windows中的VC默认都是跟系统相同,比如简体Windows是GB2312或者GBK.繁体就是BIG5编码.而我们大多数中国人用VC编译出来的 ...

  3. 第十二届湖南省赛 A - 2016 ( 数学,同余转换)

    给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量:       1. 1≤a≤n,1≤b≤m;   2. a×b 是 2016 的倍数.   Input   输入包含不超过 30 ...

  4. HDU 5186 zhx's submissions (进制转换)

    Problem Description As one of the most powerful brushes, zhx submits a lot of code on many oj and mo ...

  5. UVA - 10635 LIS LCS转换

    白书例题,元素互不相同通过哈希转换为LIS求LCS #include<iostream> #include<algorithm> #include<cstdio> ...

  6. scanf()总结--从网上收来的,感觉很好,用来提醒自己,c语言真是博大精深!!【转】

    转自:http://www.cnblogs.com/xiaocai905767378/archive/2011/06/01/2067526.html scanf杂谈          不得不说C语言真 ...

  7. icpc 银川 I. Base62 任意进制的转换 短除法

    Problem Description As we already know, base64 is a common binary-to-text encoding scheme. Here we d ...

  8. CF459C Pashmak and Buses (构造d位k进制数

    C - Pashmak and Buses Codeforces Round #261 (Div. 2) C. Pashmak and Buses time limit per test 1 seco ...

  9. poj 3635/hdu 1676 Full Tank? 车辆加油+最短路

    http://acm.hdu.edu.cn/showproblem.php?pid=1676 给出一张图,n<=1000,m<=10000. 有一辆车想从图的一个地方到达另外一个地方,每个 ...

随机推荐

  1. Differences between volume, partition and drive

    A drive is a physical block disk. For example: /dev/sda. A partition A drive can be divided into som ...

  2. Java 13 字符串

    1 String对象不可变 每一个修改String值的方法 实际上都是创建一个全新的String对象 public class Immutable { public static String upc ...

  3. Oracle 遇到的错误及处理整理 - 记录

    1. 启动监听提示: TNS-: TNS:permission denied TNS-: TNS:protocol adapter error TNS-: Insufficient privilege ...

  4. [转]c++面向对象基础

    from: here 1. C++面向对象程序设计的重要概念 早期革命影片里有这样一个角色,他说:“我是党代表,我代表党,我就是党.”后来他给同志们带来了灾难. 会用C++的程序员一定懂得面向对象程序 ...

  5. OpenGL的gluPerspective透视投影变换函数详解[转]

    函数原型void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) 首先得设置gluPersp ...

  6. 在多线程环境下使用HttpWebRequest或者调用Web Service(连接报超时问题)

    .net 的 HttpWebRequest 或者 WebClient 在多线程情况下存在并发连接限制,这个限制在桌面操作系统如 windows xp , windows  7 下默认是2,在服务器操作 ...

  7. CI 学习笔记、记录

    [ci框架]ci框架目录结构分析 分类: [CodeIgniter深入研究]2013-05-09 00:24 7420人阅读 评论(5) 收藏 举报 [php] view plaincopy mysh ...

  8. C语言中的转义字符

    转义字符 意义 ASCII码值(十进制) \a 响铃(BEL) 007 \b 退格(BS) ,将当前位置移到前一列 008 \f 换页(FF),将当前位置移到下页开头 012 \n 换行(LF) ,将 ...

  9. HDELETE

    use HDELETE to migration file deletion is good a choice. sample: //STEP0010 EXEC PGM=IKJEFT01 //SYSO ...

  10. CAS原理全面分析

    http://blog.chinaunix.net/uid-22816738-id-3525939.html 上文对CAS各方面原理做了很详细.很明了分析,包括CAS架构.认证协议.安全性.登录.认证 ...