前言:我的博客多写点东西不过分吧,你们的作业太难了,严重占用我们的时间,还说什么要让其他读者好好看看,你们要干什么我们不知道,你们的要求我想我们有必要谈谈。
SP2.1 | 任务内容 | 计划需要时间(min) | 实际完成时间(min) |
Planning | 计划 | 50 | 90 |
Estimate | 估计开发所需要的时间,需要的工作步骤,需要的思路和方法 | 50 | 90 |
Development | 开发 | 800 | 2000 |
Analysis | 需求分析(软件,语言工具等) | 150 | 300 |
Design Spec | 生成设计文档 | 20 | 60 |
Design Reviewe | 设计复审(和同事审核设计文档) | 10 | 26 |
Coding Standard | 代码规范(为目前的开发制定合适的规范) | 20 | 70 |
Desgin | 具体设计 | 200 | 600 |
Desgin | 具体编码 | 200 | 300 |
Code Review | 代码复审 | 50 | 150 |
Test | 测试(自我测试,修改代码,提交修改) | 150 | 200 |
Record Time Spent | 记录用时 | 120 | 200 |
Test Report | 测试报告 | 20 | 500 |
Size Measurement | 计算工作量 | 20 | 40 |
Postmortem & Process Improvement Plan | 事后总结和提出过程改进计划 | 80 | 80 |
功能模块 | 具体阶段 | 预计时间 (min) | 实际时间 (min) |
功能1 | 具体设计 | 40 | 50 |
具体编码 | 120 | 150 | |
测试完善 | 40 | 50 | |
功能2 | 具体设计 | 40 | 50 |
具体编码 | 110 | 150 | |
测试完善 | 50 | 50 | |
功能3 | 具体设计 | 30 | 40 |
具体编码 | 140 | 120 | |
测试完善 | 30 | 40 |
#include<bits/stdc++.h> #include<io.h> #define ll long long #define debug(x) cout<<#x<<" : "<<x<<endl; #define psl pair<string , ll> using namespace std; bool XUP_num_get(string &XUP_pp , int& file_num) { string tmp = ""; auto i = XUP_pp.find("-n"); if( i == string::npos ) return 0; i += 3; for(;i < XUP_pp.size() ; i++ ){ if( XUP_pp[i] == ‘ ‘ ) break; tmp += XUP_pp[i]; } stringstream ss; ss<<tmp; ss>>file_num; return 1; } void get_all_file(string XUP_path , vector<string>& son_files , string XUP_fmat) { long hFile = 0; struct _finddata_t fileinfo; string p; if( ( hFile = _findfirst( p.assign( XUP_path ).append("\\*" + XUP_fmat).c_str() , &fileinfo ) ) != -1 ) { do { if( fileinfo.attrib & _A_SUBDIR ){ if( strcmp( fileinfo.name , "." ) != 0 && strcmp( fileinfo.name , ".." ) != 0 ) get_all_file( p.assign(XUP_path).append("\\").append(fileinfo.name), son_files , XUP_fmat ); } else son_files.push_back( p.assign( fileinfo.name ) ); }while( _findnext( hFile , &fileinfo ) == 0 ); _findclose(hFile); } } void XUP_read_txt(string file_name , string& str) { ifstream file; file.open( file_name.c_str() ); string s; while( getline( file , s ) ) str = s + ‘ ‘ + str; transform( str.begin() , str.end() , str.begin() , ::tolower ); file.close(); } struct cmp { bool operator ()(const psl& a , const psl& b){ return a.second != b.second ? a.second > b.second : a.first < b.first; } }; //, string XUP_s void XUP_solve( string XUP_input_str ) { map<string , ll> mp; string str = "" , tmp = ""; string file_name ; string son_str; ifstream file; file.open( file_name.c_str() ); string son_s; while( getline( file , son_s ) ) son_str = son_s + ‘ ‘ + son_str; transform( son_str.begin() , son_str.end() , son_str.begin() , ::tolower ); file.close(); int file_num; bool limit = XUP_num_get( XUP_input_str , file_num ); for( auto ch : str ){ if( ch >= ‘0‘ && ch <= ‘9‘ || ch >= ‘a‘ && ch <= ‘z‘ ){ tmp += ch; continue; } if( !tmp.empty() ){ if( tmp[0] >= ‘a‘ && tmp[0] <= ‘z‘ ) mp[tmp]++; tmp = ""; } } if( !tmp.empty() ){ if( tmp[0] >= ‘a‘ && tmp[0] <= ‘z‘ ) mp[tmp]++; tmp = ""; } if( !limit ){ cout<<"total "<<mp.size()<<endl; puts(""); for( auto it : mp ) cout<<left<<setw(30)<<it.first<<it.second<<endl; } else{ cout<<"Total words is "<<mp.size()<<endl; puts("------------------"); vector<psl> vec( mp.begin() , mp.end() ); sort( vec.begin() , vec.end() , cmp() ); for( auto it : vec ){ cout<<left<<setw(30)<<it.first<<it.second<<endl; file_num--; if( !file_num ) break; } } } bool XUP_File_get(const string now , string &File_Name) { auto i = now.find("-c"); if( i == string::npos ) return false; i += 3; for(;i < now.size() ; i++ ){ if( now[i] == ‘ ‘ ) break; File_Name += now[i]; } return true; } bool XUP_Path_get(const string now , string &Path_Name) { auto i = now.find("-f"); if( i == string::npos ) return false; i += 3; for(;i < now.size() ; i++ ){ if( now[i] == ‘ ‘ ) break; Path_Name += now[i]; } return true ; } int main() { string XUP_input_str , XUP_File_Name = "" , XUP_Path_Name = "" , XUP_files = "" , XUP_real_file; getline( cin , XUP_input_str ); bool have_Path = XUP_Path_get( XUP_input_str , XUP_Path_Name ); bool have_File = XUP_File_get( XUP_input_str , XUP_File_Name ); if( have_Path ){ vector<string> files; const string format = ".txt"; get_all_file( XUP_Path_Name , files , format ); sort( files.begin() , files.end() ); XUP_real_file = XUP_Path_Name + "\\" + files[0]; } else XUP_real_file = XUP_File_Name; XUP_solve(XUP_input_str );//, XUP_real_file return 0; } /* wf -f D:\ACM±à3ì\±èèü?D -n 2 wf -c pipifan.txt */
原文:https://www.cnblogs.com/xup457/p/9688938.html