var checked = document.getElementsByName("checked_c[]"); var checked_counts = 0; for(var i = 0; i < checked.length; i ++){ if(checked[i].checked){ checked_counts++; } } checked_counts 即是统计复选框选中个数
统计无向图中三角形的个数,复杂度m*sqrt(m). #include<stdio.h> #include<vector> #include<set> #include<math.h> #include<algorithm> using namespace std; #define LL long long vector<]; set<LL> st; ], link[], ]; int main(void) { LL ans,
问题 从键盘输入一个字符串(长度不超过30),统计字符串中非数字的个数,并将统计的结果显示在屏幕上,用EXE格式实现. 源程序 data segment hintinput db "please input a string:$";输入提示语 hintoutput db "non-number:$";输出提示语 str db 30,?,30 dup(?);将输入的字符串保存在str中 crlf db 0ah,0dh,'$';回车换行符 data ends code
Ping pong Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2691 Accepted: 996 Description N(3<=N<=20000) ping pong players live along a west-east street(consider the street as a line segment). Each player has a unique skill rank. To im