神游寻周公吧 关注:717贴子:24,955
  • 4回复贴,共1

ji fang wu liao xie de

取消只看楼主收藏回复

#include<iostream>
using namespace std;
int main(){
cout<<"My name is Liz.My schedule:\n"<<endl;
cout<<" Time | MON\t"<<"TUE\t"<<"WED\t"<<"THU\t"<<"FRI\t"<<"SAT\t"<<"SUN\t"<<endl;
cout<<"-------------|-------------------------------------------------------\n";
cout<<" 8:00-9:40 | 线代\t大英\t思修\t \t高数"<<endl;
cout<<" 10:00-11:40 | \t计概\t线代\t大英\t高数"<<endl;
cout<<" | "<<endl;
cout<<" 14:00-15:40 | C++\t体育\t高数\tC++\t线代"<<endl;
cout<<" 16:00-16:45 | C++\t \t高数\tC++\t"<<endl;
return 0;
}


IP属地:天津1楼2015-10-26 15:46回复
    wang le duniang wu shi duo ge kong ge le


    IP属地:天津2楼2015-10-26 15:47
    回复
      biewenwoweishabudazhongwen,jifangdeubuntumeiyoushurufaguaiwolo


      IP属地:天津3楼2015-10-26 15:49
      回复
        #include<iostream>
        #include<math.h>
        using namespace std;
        int main(){
        int a1,b1,c1,a2,b2,c2;
        cout<<"Input the first moment(hour,minute,second): ";
        cin>>a1>>b1>>c1;
        if((a1<0)||(a1>23)||(b1<0)||(b1>60)||(c1<0)||(c1>60))
        cout<<"The moment is wrong!!!"<<endl;
        else{
        cout<<"The first moment is: "<<a1<<":"<<b1<<":"<<c1<<endl
        <<"Input the second moment(hour,minute,second):";
        cin>>a2>>b2>>c2;
        if((a2<0)||(a2>23)||(b2<0)||(b2>60)||(c2<0)||(c2>60))
        cout<<"The moment is wrong!!!"<<endl;
        else{
        int z;
        z=fabs(double(a1)-double(a2))*3600+fabs(double(b1)-double(b2))*60+fabs(double(c1)-double(c2));
        cout<<"The second moment is:"<<a2<<":"<<b2<<":"<<c2<<endl
        <<"There're "<<z<<" seconds between these two moments."<<endl<<endl;
        }
        }
        return 0;
        }


        IP属地:天津7楼2015-11-09 15:27
        回复
          #include<iostream>
          using namespace std;
          void f1(unsigned long long[], int);
          void f2(unsigned long long[], int, int);
          int main()
          {
          int m;
          cin >> m;
          const int m1 = m;
          unsigned long long a[200001];
          int b[200001] = { 0 }, c[200001] = { 0 };
          for (int i = 1; i <= m; i++)
          cin >> a[i];
          f1(a, m);
          for (int i = 0; i <= m; i++)
          {
          if (b[i] != 1)
          for (int j = i + 1; j <= m; j++)
          {
          if (a[i] == a[j])
          {
          b[j] = 1;
          c[i]++;
          }
          else
          break;
          }
          }
          for (int i = 0; i <= m; i++)
          {
          if (b[i] != 1)
          cout << a[i] << " " << c[i] << endl;
          }
          return 0;
          }
          void f1(unsigned long long a[],int c)
          {
          unsigned long long temp1;
          int temp0;
          for (int i = 0; i < c; i++)
          {
          temp1 = a[i];
          for (int j = i + 1; j < c; j++)
          {
          if (a[j] < temp1)
          {
          temp0 = j;
          temp1 = a[j];
          }
          }
          if (temp0 != 0)
          {
          f2(a, temp0, i);
          temp0 = 0;
          }
          }
          }
          void f2(unsigned long long a[],int b,int c)
          {
          unsigned long long temp;
          temp = a[b];
          a[b] = a[c];
          a[c] = temp;
          }


          IP属地:天津8楼2015-11-30 16:07
          回复