10.3 Given an input file with four billion non-negative integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB of memory available for this task. FOLLOW UP What if you have only 10 MB of memory?
// oj3.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include<iostream>#include<opencv2\opencv.hpp>#include<opencv2/imgproc/types_c.h> #include <opencv2\objdetect\objdetect_c.h> #include
#include <stdio.h> #include <iostream> using std::cout; using std::endl; //这里的两个不同的add函数根据函数的参数个数不同,编译为目标文件后 //名字发生变化 int add(int x = 0, int y = 0) { return x + y; } int add(int x, int y, int z) { return x + y + z; } int main(void) { int a = 3