自习英语

ID(1)                            User Commands                           ID(1)

                                用户命令

User:用户  command:命令

_______________________________________________________________________________

NAME

      id - print real and effective user and group IDs

SYNOPSIS

      id [OPTION]... [USER]

      

 

DESCRIPTION

      Print  user and group informationfor the specified USER, or (when USER

      omitted) for the current user.

 

      -a     ignore, for compatibilitywith other versions

 

      -Z, --context

              print only the security contextof the current user

 

       -g, --group

              print only the effective group ID

 

      -G, --groups

              print all group IDs

 

      -n, --name

              print a name instead of a number,for -ugG

 

      -r, --real

              print the real ID instead of theeffective ID, with -ugG

 

      -u, --user

              print only the effective user ID

 

      -z, --zero

              delimit entries with NULcharacters, not whitespace;

 

              not permitted in default format

 

      --help display this help and exit

 

      --version

              output version information andexit

 

      Without any OPTION, print some useful set of identified information.

 

      GNU  coreutils  online help:  <http://www.gnu.org/software/coreutils/>

      Report id translation bugs to<http://translationproject.org/team/>

 

AUTHOR

      Written by Arnold Robbins and David MacKenzie.

COPYRIGHT

      Copyright  ©  2013 Free Software Foundation, Inc. License GPLv3+: GNU

      GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

      This is free software: you are free to  change  and redistribute  it.

      There is NO WARRANTY, to the extent permitted by law.

 

SEE ALSO

      The  full  documentation for id is maintained as a Texinfo manual.  If

      the info and id programs are properly installed at your site, the  com‐

      mand

 

              info coreutils 'id invocation'

 

      should give you access to the complete manual.

 

GNU coreutils 8.22               November 2016                           ID(1)


===================================================================================================================================

D(1)                            User Commands                           ID(1)

                                用户命令

User:用户  command:命令

_______________________________________________________________________________

 

NAME

      id - print real and effective user and group IDs

      id-打印真实有效用户和组

      print:[prɪnt]打印 

      real:[riːl]实际的;真实的;实在的,真正地;确实地 

      effective:[ɪ'fektɪv] 有效的,起作用的;实际的,实在的

__________________________________________________________________________

SYNOPSIS

      Synopsis:  [sɪ'nɒpsɪs]概要,大纲

 

      id [OPTION]... [USER]

      id [选项]…[用户]

      option:  ['ɒpʃ(ə)n]选项,选择权

__________________________________________________________________________

 

DESCRIPTION

      Description:[dɪ'skrɪpʃən]n. 描述,描写;类型;说明书

_______________________________________________________________________

 

      Print  user and group informationfor the specified USER, or (when USER

      omitted) for the current user.

     打印指定用户的用户和组信息,(当用户省略时)当前用户。

     Information: ['ɪnfɚ'meʃən]n.信息,资料;知识;情报;通知

     For:为,为了;因为;给;对于;至于;适合于conj.因为

    Specified: [spɛsəˌfaɪd]adj.规定的;详细说明的v.指定;详细说明(specify的过去分词)

    When: [wɛn]conj.考虑到;既然;当时;在时;如果adv. 什么时候,何时

    Omitted: [əʊ'mɪtɪd]美 [oʊ'mɪtɪd]adj. 省略了的;省去的v. 遗漏,省略(omit的过去分词)

    Omit  [ə(ʊ)'mɪt]vt. 省略;遗漏;删除;疏忽,过去式 omitted过去分词 omitted现在分词 omitting

    Current: ['kʌr(ə)nt]美 [kɝ​ənt]adj. 现在的;流通的,通用的;最近的;草写的

    The current:当前的

___________________________________________________________________________

      -a     ignore, for compatibilitywith other versions

              忽略,因为与其它版本的兼容性。

           Ignore: [ɪg'nɔː] vt. 驳回诉讼;忽视;不理睬

          Compatibility:  [kəm,pætɪ'bɪlɪtɪ]n. [计] 兼容性

____________________________________________________________________

 

      -Z, --context

             Context环境,上下文,来龙去脉

              print only the security contextof the current user

             打印当前用户的安全环境

             Only: ['əʊnlɪ]adv. 只,仅仅;不料adj. 唯一的,仅有的;最合适的conj. 但是;不过;可是

             Security [sɪ'kjʊərətɪ]n. 安全;保证;证券;抵押品adj. 安全的;保安的;保密的

____________________________________________________________________

 

      -g, --group

              print only the effective group ID

只打印有效的组ID

 

      -G, --groups

              print all group IDs

 

      -n, --name

              print a name instead of a number,for –ugG

              打印一个名字,而不是一个数字,ugG一起使用

              Instead [ɪn'sted] adv. 代替;反而;相反

              Instead of而不是

___________________________________________________________________________

 

 

      -r, --real

              print the real ID instead of theeffective ID, with -ugG

 

      -u, --user

              print only the effective user ID

              只打印有效的用户id

 

      -z, --zero

              delimit entries with NULcharacters, not whitespace;

用于记录空字符,不是空白。

Delimit: [dɪ'lɪmɪt]vt. 划界;定界限

Entries: ['entrɪs] n. 进入;(词典所列的)词目(entry的复数形式)

Characters: [ˈkærəktə(r)z] n. 特性;人物角色(character复数)v. 描述(character的三单形式);表示…的特性

NUL: n. 空,空字符

Whitespacen. 空白,空格

              not permitted in default format

不允许在默认的格式

Permit: [pə'mɪt] vi. 许可;允许vt. 许可;允许n. 许可证,执照

Permitin 在…….内

Default:vi. 拖欠;不履行;不到场n. 违约;缺席;缺乏;系统默认值vt. 不履行;不参加(比赛等);对…处以缺席裁判

Format: ['fɔːmæt]n. 格式;版式;开本vt. 使格式化;规定…的格式vi. 设计版式过去式 formatted过去分词 formatted现在分词 formatting

__________________________________________________________________________

 

      --help display this help and exit

            显示这个帮助并退出

           Display:n. 显示;炫耀vt. 显示;表现;陈列vi. [] 作炫耀行为adj. 展览的;陈列用的

      --version

               Version: ['vɜːʃ(ə)n] n. 版本;译文;倒转术

 

              output version information andexit

              输出版本信息并退出

      Without any OPTION, print some useful set of identified information.

没有任何选项,打印一些有用的信息

 

      GNU  coreutils  online help:  http://www.gnu.org/software/coreutils/

GNU在线帮助

Online: [ɒn'laɪn]在线,联机

      Report id translation bugs to http://translationproject.org/team/

错误报告调任

Report: [rɪ'pɔːt]  n. 报告;报道;成绩单vt. 报告;报导;使报到vi. 报告;报到;写报导

 

Translation: [træns'leɪʃ(ə)n;] n. 翻译;译文;转化;调任

 

AUTHOR

Author作者

      Written by Arnold Robbins and David MacKenzie.

   Written 英 ['rɪtn]adj. 书面的,成文的;文字的v. 写(write的过去分词)

Written by由………

 

COPYRIGHT

       Copyright: ['kɒpɪraɪt]n. 版权,著作权adj. 版权的;受版权保护的vt. 保护版权;为…取得版权

 

      Copyright  ©  2013 Free Software Foundation, Inc. License GPLv3+: GNU

版权©2013年自由软件基金会有限公司许可GPLv3 +:GNU

 

      GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

GPL 3或更高版本< http://gnu.org/licenses/gpl.html >

      This is free software: you are free to  change  and redistribute  it.

这是自由软件:你可以自由变化和重新分配。

      There is NO WARRANTY, to the extent permitted by law.

没有保修,法律允许的程度

SEE ALSO

      See also另请参阅

Also: ['ɔːlsəʊ] adv. 也;而且;同样conj. 并且;另外

      The  full  documentation for id is maintained as a Texinfo manual.  If

      the info and id programs are properly installed at your site, the  com‐

      mand

完整的文档id作为Texinfo维护手册。如果

信息和标识程序正确安装在您的站点,com所致

祈使语

Full:adj. 完全的,完整的;满的,丰富的;完美的;丰满的;详尽的adv.十分,常;完全地;整整n.全部;完整

Documentation:  [,dɒkjʊmen'teɪʃ(ə)n]文件,证明文件。

Forprep. 为,为了;因为;给;对于;至于;适合于conj. 因为

Maintained [meɪn'teɪnd]adj. 被保持的v. 维护,维修;维持(maintain的过去分词)

As: [æz;əz]conj. 因为;随着;虽然;依照;当…时prep. 如同;当作;以…的身份adv.同样地;和…一样的

 

Manual: ['mænjʊ(ə)l] 手册、指南

 

              info coreutils 'id invocation'

 

      should give you access to the complete manual.

      应该给你访问完整的手册

Should:应该;就;可能;将要

Giveyou给你

Complete完整的、完全的、彻底的。完成。

GNU coreutils 8.22               November 2016                           ID(1)

好的,这是一个典型的排课问题,可以使用回溯法来解决。下面是一个可能的解法: ```c #include <stdio.h> #include <stdbool.h> #define DAYS_OF_WEEK 5 #define CLASSES_PER_DAY 4 #define SUBJECTS 4 const char* subject_names[SUBJECTS] = {"语文", "数学", "英语", "自习"}; // 每个科目每周需要上的课时数 const int class_hours[SUBJECTS] = {5, 4, 4, 0}; // 每个时间段是否已经安排了课程 bool schedule[DAYS_OF_WEEK][CLASSES_PER_DAY] = { false }; // 每个时间段安排的科目 int arrangement[DAYS_OF_WEEK][CLASSES_PER_DAY] = { 0 }; // 判断当前时间段是否可以安排指定的科目 bool can_schedule(int day, int class_time, int subject) { // 第一节课必须是语文或英语 if ((day == 0 && class_time == 0) || (day == 1 && class_time == 0)) { return subject == 0; } // 第一节课必须是语文或英语 if ((day == 2 && class_time == 0) || (day == 3 && class_time == 0) || (day == 4 && class_time == 0)) { return subject == 2; } // 课程不能重复 for (int i = 0; i < CLASSES_PER_DAY; i++) { if (arrangement[day][i] == subject) { return false; } } // 检查每周上课时数 int total_hours = 0; for (int i = 0; i < DAYS_OF_WEEK; i++) { for (int j = 0; j < CLASSES_PER_DAY; j++) { if (arrangement[i][j] == subject) { total_hours++; } } } return total_hours < class_hours[subject]; } // 输出当前的排课方案 void print_arrangement() { for (int i = 0; i < DAYS_OF_WEEK; i++) { printf("周%d: ", i + 1); for (int j = 0; j < CLASSES_PER_DAY; j++) { int subject = arrangement[i][j]; printf("%s ", subject_names[subject]); } printf("\n"); } printf("\n"); } // 回溯求解排课方案 bool backtrack(int day, int class_time) { // 已经排完了所有的时间段 if (day == DAYS_OF_WEEK && class_time == CLASSES_PER_DAY) { return true; } // 当前时间段已经安排了课程,跳过 if (schedule[day][class_time]) { return backtrack(day + (class_time + 1) / CLASSES_PER_DAY, (class_time + 1) % CLASSES_PER_DAY); } // 尝试安排每个科目 for (int i = 0; i < SUBJECTS; i++) { if (can_schedule(day, class_time, i)) { schedule[day][class_time] = true; arrangement[day][class_time] = i; if (backtrack(day + (class_time + 1) / CLASSES_PER_DAY, (class_time + 1) % CLASSES_PER_DAY)) { return true; } // 回溯 schedule[day][class_time] = false; arrangement[day][class_time] = -1; } } return false; } int main() { if (backtrack(0, 0)) { print_arrangement(); } else { printf("无法安排课程\n"); } return 0; } ``` 这个程序使用了一个二维数组 `schedule` 来记录每个时间段是否已经安排了课程,使用另一个二维数组 `arrangement` 来记录每个时间段安排的科目。回溯算法的核心是 `backtrack` 函数,它尝试在当前时间段安排每个科目,并递归地尝试下一个时间段,直到所有时间段都排完或者无法继续安排。在每个时间段,我们需要判断当前科目是否可以安排,判断的条件包括:第一节课的限制、课程不能重复、每周上课时数不能超过限制等。如果当前方案无法继续,就回溯到上一个时间段,尝试其他的安排方案。最后输出一个可行的排课方案。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值