直接模拟会超时 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=21; 6 int d,n; 7 bool f[1 2 #include 3 #include 4 using namespace std...
分类:
其他好文 时间:
2015-07-24 12:11:53
阅读次数:
149
问题描述出错代码如下:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"...
分类:
其他好文 时间:
2015-07-24 10:54:11
阅读次数:
108
测试描述:建立一个简单的静态链表,它由3个学生数据的结点组成。输出各结点中的数据。
代码如下:
#include
using namespace std;
struct Student
{
int num;
float score;
Student *next;
};
int main()
{
Student a,b,c,*head,*p;//都是Studen...
分类:
其他好文 时间:
2015-07-24 10:52:57
阅读次数:
125
#include
using namespace std;
int n,m;
int spfa_bfs(){
int d[100] = {0};
int c[100] = {0};
int vis[100] = {0};
for(int i = 0;i < n;i++){
d[i] = INF;
}
d[s] = 0;
queue que;
que.push(s);
c...
分类:
其他好文 时间:
2015-07-24 10:46:10
阅读次数:
169
测试描述:临时开辟一个存储空间以存放一个结构体数据
#include
#include
using namespace std;
struct Student
{
string name;
int age;
char sex;
};
int main()
{
Student *p; //定义指向结构体类型Student的数据的指针变量p
p=ne...
分类:
其他好文 时间:
2015-07-24 09:19:13
阅读次数:
141
描述 求A+B是否与C相等。输入T组测试数据。每组数据中有三个实数A,B,C(-10000.0 2 3 using namespace std; 4 5 int main() 6 { int n; 7 double a,b,c; 8 cin>>n; 9 whil...
分类:
其他好文 时间:
2015-07-24 09:08:35
阅读次数:
95
用数组写感觉萌萌哒啊,本题可以写个link函数,更加方便 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 int r[maxx],l[maxx]; 7 int n,m; 8 long...
分类:
其他好文 时间:
2015-07-24 06:52:44
阅读次数:
139
运气不错,这次cf大涨,居然是房间第二(要不是D题TLE了,就第一了)用string会TLE,用char加下标,还看到更牛的算法, 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=200010; 6 c...
分类:
其他好文 时间:
2015-07-24 06:47:22
阅读次数:
113
原来数组可以代替指针,涨姿势 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 char a[maxx]; 7 int next[maxx],cur,last; 8 int main(...
分类:
其他好文 时间:
2015-07-24 06:46:03
阅读次数:
120
与习题相关的代码
Hello.cpp
#include
using namespace std;
int main()
{
cout << "Hello, World! I am "
<< 8 << " Today!" << endl;
}Stream2.cpp
#include
using namespace std;
int main()
{
cout<<...
分类:
编程语言 时间:
2015-07-24 01:29:28
阅读次数:
152