Permalink
Browse files

delete submission files

  • Loading branch information...
1 parent aaba8b6 commit c23aadab2c33af2db8bdd8df2079b89c4a1946bf @vmingchen committed Oct 25, 2010
Showing with 0 additions and 274 deletions.
  1. +0 −92 1001/ref1.cpp
  2. +0 −23 1006/6049001_WA.cc
  3. +0 −28 1006/6049011_AC_63MS_744K.cc
  4. +0 −51 1007/6052146_AC_32MS_716K.cc
  5. +0 −80 1008/6077617_AC_0MS_364K.cc
View
@@ -1,92 +0,0 @@
-/*
- * =====================================================================================
- *
- * Filename: ref1.cpp
- *
- * Description: POJ 1001, from http://hi.baidu.com/stlnkm/blog/item/df5380fd3fce2640d7887d14.html
- *
- * Version: 1.0
- * Created: 04/19/2009 10:18:45 PM
- * Revision: none
- * Compiler: gcc
- *
- * Author: Ming Chen (chm), mingchen@cse.buaa.edu.cn
- * Company: BUAA.edu
- *
- * =====================================================================================
- */
-
-#include<iostream>
-#include<string>
-using namespace std;
-string Expon(string base,int t);
-int main()
-{
-string base;
-int exp;
-while(cin>>base>>exp)
-{
- cout<<Expon(base,exp)<<endl;
-}
-return 0;
-}
-#define maxbit 200
-string Expon(string base,int t) //求幂
-{
-int res[maxbit],bs[maxbit],tmp[maxbit];
-memset(bs,0,sizeof(bs));
-memset(tmp,0,sizeof(tmp));
-int i,j=0;
-int dpl=base.find_first_of('.'); //记录底数小数点位置
-for(i=base.length()-1;i>=0;i--)
-{
- if(base[i]!='.')
- {
- bs[j]=base[i]-'0';
- tmp[j]=base[i]-'0';
- j++;
- }
-}
-int k,p,h;
-for(i=1;i<t;i++) //t次幂
-{
- memset(res,0,sizeof(res));
- for(k=0;k<j;k++)
- {
- for(p=0;p<j*i;p++) //模拟乘法运算
- res[k+p]+=bs[k]*tmp[p];
- for(h=0;h<k+p;h++) //处理进位
- {
- res[h+1]+=res[h]/10; //高位
- res[h]%=10; //低位
- }
- }
- memcpy(tmp,res,sizeof(res));
-}
-i=maxbit-1;
-while(tmp[i]==0) //去除前导零
- i--;
-j=0;
-while(tmp[j]==0) //去除后缀零
- j++;
-int dot=(base.length()-dpl-1)*t-1; //计算小数点位置
-string rslt;
-if(i<=dot)
-{
- rslt+='.';
- for(h=0;h<dot-i;h++)
- rslt+='0';
-}
-for(h=i;h>=j;h--)
-{
- if(h==dot)
- rslt+='.';
- rslt+=('0'+tmp[h]);
-}
-if(j>=dot)
-{
- for(h=0;h<j-dot-1;h++)
- rslt+='0';
-}
-return rslt;
-}
View
@@ -1,23 +0,0 @@
-#include <iostream>
-
-using namespace std;
-
-int main()
-{
- int res[24][29][34];
- for ( int i = 23*28*33; i > 0; i-- ) {
- int a = i % 23;
- int b = i % 28;
- int c = i % 33;
- res[a][b][c] = i;
- }
-
- int p, e, i, d;
- for ( int j = 1; cin >> p >> e >> i >> d && p >= 0; j++ ) {
- p = p % 23;
- e = e % 28;
- i = i % 33;
- cout << "Case " << j << ": the next triple peak occurs in " << res[p][e][i] - d << " days." << endl;
- }
- return 0;
-}
@@ -1,28 +0,0 @@
-#include <iostream>
-
-using namespace std;
-
-const int CIRCLE = 23*28*33;
-
-int main()
-{
- int res[24][29][34];
- for ( int i = CIRCLE; i > 0; i-- ) {
- int a = i % 23;
- int b = i % 28;
- int c = i % 33;
- res[a][b][c] = i;
- }
-
- int p, e, i, d, r;
- for ( int j = 1; cin >> p >> e >> i >> d && p >= 0; j++ ) {
- p = p % 23;
- e = e % 28;
- i = i % 33;
- d = d % CIRCLE;
- r = res[p][e][i] - d;
- if ( r < 0 ) r += CIRCLE;
- cout << "Case " << j << ": the next triple peak occurs in " << r << " days." << endl;
- }
- return 0;
-}
@@ -1,51 +0,0 @@
-#include <iostream>
-#include <string>
-#include <algorithm>
-
-using namespace std;
-
-const int MAXM = 101;
-
-class DNA {
-public:
- string str;
- int disorder;
-};
-
-bool operator< (const DNA &d1, const DNA &d2)
-{
- return d1.disorder < d2.disorder
- || (d1.disorder == d2.disorder && d1.str < d2.str);
-}
-
-int main()
-{
- int cmap[26] = {-1};
- cmap['A'-'A'] = 0;
- cmap['C'-'A'] = 1;
- cmap['G'-'A'] = 2;
- cmap['T'-'A'] = 3;
-
- int n, m;
- cin >> n >> m;
-
- DNA dna[MAXM];
- for ( int i = 0; i < m; ++i ) {
- cin >> dna[i].str;
- dna[i].disorder = 0;
- int count[4] = {0};
- for ( int j = 0; j < n; ++j ) {
- int idx = cmap[dna[i].str[j]-'A'];
- count[idx]++;
- for ( int k = idx+1; k < 4; ++k )
- dna[i].disorder += count[k];
- }
- }
-
- sort( dna, dna + m );
-
- for ( int i = 0; i < m; ++i )
- cout << dna[i].str << endl;
-
- return 0;
-}
@@ -1,80 +0,0 @@
-#include <cstdio>
-#include <cstring>
-
-using namespace std;
-
-const char *HaabMonth[19] = {
- "pop",
- "no",
- "zip",
- "zotz",
- "tzec",
- "xul",
- "yoxkin",
- "mol",
- "chen",
- "yax",
- "zac",
- "ceh",
- "mac",
- "kankin",
- "muan",
- "pax",
- "koyab",
- "cumhu",
- "uayet",
-};
-
-const char *TzolkinDay[20] = {
- "imix",
- "ik",
- "akbal",
- "kan",
- "chicchan",
- "cimi",
- "manik",
- "lamat",
- "muluk",
- "ok",
- "chuen",
- "eb",
- "ben",
- "ix",
- "mem",
- "cib",
- "caban",
- "eznab",
- "canac",
- "ahau",
-};
-
-int haab2century(int day, const char *month, int year)
-{
- int im = 0;
- while ( im < 19 && strcmp(HaabMonth[im], month) != 0 ) im++;
- return year * 365 + im * 20 + day;
-}
-
-void centruy2tzolkin(int cent, int *number, int *name, int *year)
-{
- *year = cent / 260;
- cent -= (*year)*260;
- *number = cent % 13 + 1;
- *name = cent % 20;
-}
-
-int main()
-{
- int n, day, year, num, name, cent;
- char month[10];
-
- scanf("%d\n", &n);
- printf("%d\n", n);
- for (int i = 1; i <= n; i++) {
- scanf("%d. %s %d\n", &day, month, &year);
- cent = haab2century(day, month, year);
- centruy2tzolkin(cent, &num, &name, &year);
- printf("%d %s %d\n", num, TzolkinDay[name], year);
- }
- return 0;
-}

0 comments on commit c23aada

Please sign in to comment.