user-0 提问: 求助！有关交集问题

回复:
user: user-1
content: A = B= C  A = B = C =  A = B  = C  A = B== C =  A = B == C =  A = B=== C =  A == B== C =  A == B  == C  =  A === B = C =  A === B  = C  =  A === B   = C   =

user: user-2
content: A和B都是有序递增的，所以不需要用那么多嵌套循环了， 循环一次就够了

user: user-1
content: /STACK   (Stack Allocations) Home |  Overview |  How Do I |  Linker Options  The Stack Allocations (/STACK:reserve[,commit]) option sets the size of the stack in bytes.   To find this option in the development environment, click Settings on the Project menu. Then click the Link tab, and click Output in the Category box. The Reserve text box (or in the reserve argument on the command line) specifies the total stack allocation in virtual memory. The default stack size is 1 MB. The linker rounds up the specified value to the nearest 4 bytes.  The optional value specified in the Commit text box (or in the commit argument on the command line) is subject to interpretation by the operating system. In Windows NT, it specifies the amount of physical memory to allocate at a time. Committed virtual memory causes space to be reserved in the paging file. A higher commit value saves time when the application needs more stack space, but increases the memory requirements and possibly the startup time.  Specify the reserve and commit values in decimal or C-language notation.  Another way to set the size of the stack is with the STACKSIZE statement in a module-definition (.DEF) file. STACKSIZE overrides the Stack Allocations (/STACK) option if both are specified. You can change the stack after the .EXE file is built by using the EDITBIN tool.   50010×3×4=600120<1048576

user: user-3
content: 引用 6 楼 zhao4zhong1 的回复:[quote=引用 5 楼 u014444402 的回复:] 正好休息.来一个.  int main() {     int a[50010];     int b[50010];     int collection[50010];     int i,j,n,label=0, aIndex = 0, bIndex = 0, cIndex = 0; while(scanf("%d",&n)!=EOF&&n!=0) {     for(i=0;i<n;i++)         scanf("%d",&a[i]);     for(j=0;j<n;j++)         scanf("%d",&b[j]);     aIndex = 0;     bIndex = 0;     cIndex = 0;     while ( (aIndex < n) && (bIndex < n) )     {         if ( a[aIndex] == b[bIndex] )         {             collection[cIndex++] = a[aIndex];             aIndex++;             bIndex++;          }         else if ( a[aIndex] > b[bIndex] )         {             bIndex++;         }         else         {             aIndex++;         }     }       display(collection,cIndex); }      return 0; }  在占用内存空间较大的局部数组声明的前面加static将其从堆栈数据段挪到全局数据段即可避开因局部数组大小超过默认堆栈大小1MB造成程序不能正常运行的问题。 [/quote] 在他原来的基础上改的, 原来的能运行,现在的就能运行. 不要老找这些不痛不痒的毛病. 有本事就表明自己的观点.老是复制粘贴,真是够烦,看见你的回复就烦.

user: user-1
content: 引用 5 楼 u014444402 的回复:正好休息.来一个.  int main() {     int a[50010];     int b[50010];     int collection[50010];     int i,j,n,label=0, aIndex = 0, bIndex = 0, cIndex = 0; while(scanf("%d",&n)!=EOF&&n!=0) {     for(i=0;i<n;i++)         scanf("%d",&a[i]);     for(j=0;j<n;j++)         scanf("%d",&b[j]);     aIndex = 0;     bIndex = 0;     cIndex = 0;     while ( (aIndex < n) && (bIndex < n) )     {         if ( a[aIndex] == b[bIndex] )         {             collection[cIndex++] = a[aIndex];             aIndex++;             bIndex++;          }         else if ( a[aIndex] > b[bIndex] )         {             bIndex++;         }         else         {             aIndex++;         }     }       display(collection,cIndex); }      return 0; }  在占用内存空间较大的局部数组声明的前面加static将其从堆栈数据段挪到全局数据段即可避开因局部数组大小超过默认堆栈大小1MB造成程序不能正常运行的问题。

user: user-3
content: 正好休息.来一个.  int main() {     int a[50010];     int b[50010];     int collection[50010];     int i,j,n,label=0, aIndex = 0, bIndex = 0, cIndex = 0; while(scanf("%d",&n)!=EOF&&n!=0) {     for(i=0;i<n;i++)         scanf("%d",&a[i]);     for(j=0;j<n;j++)         scanf("%d",&b[j]);     aIndex = 0;     bIndex = 0;     cIndex = 0;     while ( (aIndex < n) && (bIndex < n) )     {         if ( a[aIndex] == b[bIndex] )         {             collection[cIndex++] = a[aIndex];             aIndex++;             bIndex++;          }         else if ( a[aIndex] > b[bIndex] )         {             bIndex++;         }         else         {             aIndex++;         }     }       display(collection,cIndex); }      return 0; }

user: user-4
content: 位图法...

user: user-1
content: A、B、C三个集合在水平数轴上位置关系的N种可能。

user: user-0
content: 引用 1 楼 zhao4zhong1 的回复:A = B= C  A = B = C =  A = B  = C  A = B== C =  A = B == C =  A = B=== C =  A == B== C =  A == B  == C  =  A === B = C =  A === B  = C  =  A === B   = C   =  老师，我是新手，这个是什么意思啊